I've written a module which uses buddylist_add to add a user's buddies. However, it sometimes generates a user id of 0. When buddylist_add is called with a value of zero, it adds the anonymous user.

Related is the fact that because the anonymous user doesn't have a user profile page, it can't be removed from your buddylist without manually calling buddy/delete/0.

I believe there should be a check right at the beginning of buddylist_add and buddylist_add_request to check for a value of zero.

Comments

awong’s picture

I tested it, this issue has already been resolved in the "HEAD" version. When using the buddylist_add to add a user's buddies, if trying to add a anonymous user to the buddylist. It will come up a message saying "This user does not exist", and it refuse to add the anonymous user.