mirror of
https://github.com/friendica/friendica
synced 2025-04-26 21:50:11 +00:00
Relocated function
This commit is contained in:
parent
a5ddcb367b
commit
da79566125
2 changed files with 20 additions and 20 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue