Originally posted by wackywizards
View Post
Code:
function inboxson($uid) // id is the user to whom you want to send pm
{
global $sid; // it wil get sid from the logged user who is sending pm
$_logged_id = getuid_sid($sid); // login id or who is sending pm id
$query = mysql_fetch_array(mysql_query("SELECT private FROM usertable WHERE id='".$uid."'")); // check for private value from userstable
if($query[0]!="0"||ismod($_logged_id)) // check if users private values is not 0 and if login id is of moder
{
return true; // if conditions found true it will send pm
}
else
{
return false; // otherwise it wil not
}
}
Leave a comment: