Active
Project:
Buddylist
Version:
5.x-1.1-beta
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2008 at 11:56 UTC
Updated:
8 Jul 2008 at 12:05 UTC
Objective: only approved buddies may send messages via a user's personal contact form.
Note: buddies require approval.
I think to start with a borrowed function like:
function _buddylistext_is_buddy($uid, $bid) {
$isbuddy = db_result(db_query("SELECT * FROM {buddylist} WHERE uid = %d AND buddy = %d",$uid, $bid));
return $isbuddy;
} to generate an $isbuddy value and something like
if (!$isbuddy) {
$output = t('The user %name is not a buddy. You may only contact people in your buddylist.', array('%name' => $account->name));
}in "function contact_user_page()" but I don't know how to proceed without hacking the contact module which I think is best left untouched.
How to approach?
Comments
Comment #1
bobdalob commentedSorry - that's borrowed from here