Closed (duplicate)
Project:
Buddylist
Version:
4.7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Jul 2006 at 15:22 UTC
Updated:
25 Dec 2006 at 20:19 UTC
I was wondering if anyone knew how to setup the buddylist module so there is automaticaly (an admin) user on their friendlist from when they register? Kinda like myspace has Tom as a friend for every new user.
Possible?
Comments
Comment #1
robertdouglass commentedFor anyone interested in implementing this, here is a suggestion how you would do it:
Comment #2
apt94jesse commentedI got my functionality to work like this. I added these lines in the page.tpl.php:
As you can see, I query the buddylist table, count the entries where the current user has buddies. If that count is 0, then it executes the insert query adding the default buddy. This way, whenever a new user logs in for the first time, their buddy count is of course 0, so it adds the buddy into the table.
Comment #3
rkn-dupe commentedSounds like a good idea. I will try it out sometime, if it works for everyone i reckon it should be part of buddylist because its a good feature!
Comment #4
apt94jesse commentedThis thread follows my progress, should you be interested. I doubt it would be possible to be part of the buddylist.module since it requires adding some lines of code into the core user.module.
http://drupal.org/node/90437
Comment #5
fago