mirror of
https://github.com/friendica/friendica
synced 2025-04-25 18:30:11 +00:00
Changes:
- added some type-hints - added some documentation - used self::exists() instead of DBA::exists('user', ['uid' => $uid])
This commit is contained in:
parent
a2a7d04fa1
commit
ba1c1049d6
2 changed files with 68 additions and 41 deletions
|
@ -276,7 +276,8 @@ class User
|
|||
/**
|
||||
* Returns true if a user record exists with the provided id
|
||||
*
|
||||
* @param integer $uid
|
||||
* @param int $uid
|
||||
*
|
||||
* @return boolean
|
||||
* @throws Exception
|
||||
*/
|
||||
|
@ -412,7 +413,7 @@ class User
|
|||
|
||||
$owner = DBA::selectFirst('owner-view', [], ['uid' => $uid]);
|
||||
if (!DBA::isResult($owner)) {
|
||||
if (!DBA::exists('user', ['uid' => $uid]) || !$repairMissing) {
|
||||
if (!self::exists($uid) || !$repairMissing) {
|
||||
return false;
|
||||
}
|
||||
if (!DBA::exists('profile', ['uid' => $uid])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue