function subuser_get_parent in Subuser 6
API function to identify any parent for a given user account.
Parameters
$uid: [optional] The uid of a potential subuser account. Defaults to current user.
Return value
The parent uid or FALSE.
1 call to subuser_get_parent()
- subuser_mail_alter in ./
subuser.module - Implements hook_mail_alter().
File
- ./
subuser.module, line 440 - Allows users of a particular role to create sub user account in another role.
Code
function subuser_get_parent($uid = NULL) {
if ($uid == NULL) {
$uid = $GLOBALS['user']->uid;
}
return db_result(db_query("SELECT parent_id FROM {subuser_relationship} WHERE uid = %d", $uid));
}