Use the item functions at many more places

This commit is contained in:
Michael 2018-06-18 20:36:34 +00:00
parent 68ab3764e9
commit 4714cb746b
13 changed files with 191 additions and 306 deletions

View file

@ -65,6 +65,21 @@ class User
return $r;
}
/**
* @brief Get owner data by nick name
*
* @param int $nick
* @return boolean|array
*/
public static function getOwnerDataByNick($nick)
{
$user = dba::selectFirst('user', ['uid'], ['nickname' => $nick]);
if (!DBM::is_result($user)) {
return false;
}
return self::getOwnerDataById($user['uid']);
}
/**
* @brief Returns the default group for a given user and network
*