Currently, although there's no link for it, the user can add himself to his own buddylist by typing in the url for adding a buddy and using his own uid. Perhaps the current user should be filtered out on the add user page.

Comments

nodestroy’s picture

if i try to do so i get following message (xxx.at/buddy/add/1)

Cannot add yourself to buddylist

if you call an api function (e.g. buddy_api_add), you can add yourself to buddylist. i think this should be filtered out by the userinterface (and actually it is filtered out by the userinterface).

maybe you are not working with the newest code?

regards

nodestroy’s picture

Status: Active » Fixed

with newest version definitely fixed

instantgeek’s picture

Version: » 5.x-1.x-dev

hum, you're right, just by typing it in it won't work. i had added this as a link in a view, and managed to add myself. so actually if you use something like
xxx/buddy/add/1%3Fdestination%3Duser/1
instead of
xxx/buddy/add/1?destination=user/1,
it should work.

nodestroy’s picture

i can´t see any differences at your two urls (except the urlencode)

instantgeek’s picture

but for some reason the first one works. don't ask me why. did you try it?

nodestroy’s picture

Assigned: Unassigned » nodestroy
Category: feature » bug
Priority: Minor » Critical
Status: Fixed » Active
nodestroy’s picture

i found the problem:
1%3Fdestination%3Duser/1 is interpreted as argument, and i checked: if (currentuserid == argument).
now im using the loaded user, and it works ;)

you can get the file here:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/buddylist2/...
or in a few hours from project page (dev snapshot)

nodestroy’s picture

Status: Active » Fixed

should be fixed

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.