Relocated function

This commit is contained in:
Michael 2018-09-28 03:56:41 +00:00
parent a5ddcb367b
commit da79566125
2 changed files with 20 additions and 20 deletions

View file

@ -31,6 +31,23 @@ require_once 'include/text.php';
*/
class User
{
/**
* @brief Returns the user id of a given profile url
*
* @param string $profile
*
* @return integer user id
*/
public static function getIdForURL($url)
{
$self = DBA::selectFirst('contact', ['uid'], ['nurl' => normalise_link($url), 'self' => true]);
if (!DBA::isResult($self)) {
return false;
} else {
return $self['uid'];
}
}
/**
* @brief Get owner data by user id
*