Update Query to Make friends automatically..

I'd like to make all members in my database friends of Admin user. I think this will be easier if I do a simple update query since I already know the Admin ID, but I don't know which table I need to update and which column name to use to update the flag from Yes to No, or from 0 to 1 - not sure.. I'd appreciate any input / advise on this.. Thanks.
Quote · 12 Oct 2011

 

If no one else is going to answer your question you KNOW I'm going to haha. Put the file I attached in the root of your site and run it ONCE then delete it. This will make all current members friends with member #1. If you aren't member #1 just change this line in my file:

$adminID = "1";

 

To make all new members that join after you run my script friends with the admin edit /inc/classes/BxDolProfilesController.php ... find this line somewhere around line 175:

  $aPlus = array( 'ConfCode' => $sConfCode, 'ConfirmationLink' => $sConfLink );

 

and add this below it:

$today = date("Y-m-d H-m-s");   

mysql_query("INSERT INTO `sys_friend_list` VALUES('1', '$iMemID', '1', '$today')");

 

That should do it :-)

adminfriends.php · 644B · 86 downloads
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 13 Oct 2011

Always Helpful Mscott ! Thank you for this Valuable info. !

Quote · 19 Oct 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.