mirror of
https://github.com/friendica/friendica
synced 2024-12-23 08:00:16 +00:00
Simplified code
This commit is contained in:
parent
d56793dd09
commit
2420bf84db
1 changed files with 2 additions and 13 deletions
|
@ -310,15 +310,6 @@ class Authentication
|
|||
$a->timezone = $user_record['timezone'];
|
||||
}
|
||||
|
||||
$masterUid = $user_record['uid'];
|
||||
|
||||
if ($this->session->get('submanage')) {
|
||||
$user = $this->dba->selectFirst('user', ['uid'], ['uid' => $this->session->get('submanage')]);
|
||||
if ($this->dba->isResult($user)) {
|
||||
$masterUid = $user['uid'];
|
||||
}
|
||||
}
|
||||
|
||||
$contact = $this->dba->selectFirst('contact', ['id'], ['uid' => $user_record['uid'], 'self' => true]);
|
||||
if ($this->dba->isResult($contact)) {
|
||||
$a->contact_id = $contact['id'];
|
||||
|
@ -331,10 +322,8 @@ class Authentication
|
|||
$this->dba->update('user', ['login_date' => DateTimeFormat::utcNow()], ['uid' => $user_record['uid']]);
|
||||
|
||||
// Set the login date for all identities of the user
|
||||
if (!empty($masterUid)) {
|
||||
$this->dba->update('user', ['login_date' => DateTimeFormat::utcNow()],
|
||||
['parent-uid' => $masterUid, 'account_removed' => false]);
|
||||
}
|
||||
$this->dba->update('user', ['login_date' => DateTimeFormat::utcNow()],
|
||||
['parent-uid' => $user_record['uid'], 'account_removed' => false]);
|
||||
}
|
||||
|
||||
if ($login_initial) {
|
||||
|
|
Loading…
Reference in a new issue