By Ignacio on Monday, 27 January 2014
Posted in General Issues
Replies 3
Likes 0
Views 628
Votes 0
Hello, is it posible to make the site administrator friend of all registered users?

Would you recomend triyng achiving it via sql?

Thank you,
Hi,

Try this sql:


insert into {prefix}_social_friends (actor_id, target_id, state, created, modified)
select {#id} as actor_id, user_id, '1' as state, now() as created, now() as modified from {prefix}_social_users
where user_id != {#id}
and {#id} not in (select actor_id from {prefix}_social_friends)
and {#id} not in (select target_id from {prefix}_social_friends);


1. Replace {prefix} with your database table prefix
2. Replace {#id} with the admin user id that you would like to run this script for.

Important:

Do make a backup copy of the table {prefix}_social_friends first before performing this sql.
·
Monday, 27 January 2014 15:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you!

Excellent products, excellent service!

·
Tuesday, 28 January 2014 03:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

Thanks for the compliments and you're most welcome.
·
Tuesday, 28 January 2014 10:31
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post