Merge pull request #10416 from annando/empty-parents
An empty user id does not have children
This commit is contained in:
commit
099b4caef2
|
@ -1505,6 +1505,10 @@ class User
|
||||||
*/
|
*/
|
||||||
public static function identities($uid)
|
public static function identities($uid)
|
||||||
{
|
{
|
||||||
|
if (empty($uid)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
$identities = [];
|
$identities = [];
|
||||||
|
|
||||||
$user = DBA::selectFirst('user', ['uid', 'nickname', 'username', 'parent-uid'], ['uid' => $uid]);
|
$user = DBA::selectFirst('user', ['uid', 'nickname', 'username', 'parent-uid'], ['uid' => $uid]);
|
||||||
|
|
|
@ -342,8 +342,10 @@ class Authentication
|
||||||
$this->dba->update('user', ['login_date' => DateTimeFormat::utcNow()], ['uid' => $user_record['uid']]);
|
$this->dba->update('user', ['login_date' => DateTimeFormat::utcNow()], ['uid' => $user_record['uid']]);
|
||||||
|
|
||||||
// Set the login date for all identities of the user
|
// Set the login date for all identities of the user
|
||||||
$this->dba->update('user', ['login_date' => DateTimeFormat::utcNow()],
|
if (!empty($masterUid)) {
|
||||||
['parent-uid' => $masterUid, 'account_removed' => false]);
|
$this->dba->update('user', ['login_date' => DateTimeFormat::utcNow()],
|
||||||
|
['parent-uid' => $masterUid, 'account_removed' => false]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($login_initial) {
|
if ($login_initial) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user