Closed (fixed)
Project:
Buddylist2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2007 at 00:55 UTC
Updated:
17 Jan 2008 at 08:36 UTC
Sorry if i am missing something or wrong..
function buddy_api_get_buddies() doesn't check the user status. Whether the user is active or blocked. We need to return only active buddies but not the blocked ones.
The sql
$sql = 'SELECT u.uid, u.name, b.buddy FROM {buddylist} b
INNER JOIN {users} u ON b.buddy = u.uid
WHERE b.uid = %d';
I think its good to add u.status = 1 to where clause.
$sql = 'SELECT u.uid, u.name, b.buddy FROM {buddylist} b
INNER JOIN {users} u ON b.buddy = u.uid
WHERE b.uid = %d AND u.status = 1';
By adding the status we only return only active buddies but not the blocked ones.
Looking forward to hear from others and author.
Comments
Comment #1
nodestroy commentedhi,
yes, you are right. will fix this today.
Comment #2
sangamreddi commentedThanks..
Comment #3
nodestroy commenteddone
Comment #4
(not verified) commentedComment #5
nodestroy commented