]> git.mxchange.org Git - friendica.git/blobdiff - src/Security/Authentication.php
An empty user id does not have children
[friendica.git] / src / Security / Authentication.php
index 430ede13b4bc5e6eb6f1f8e6bf93601d1de1fec0..ce101477e0a2ee043764ea18b70ac98c8d0ad970 100644 (file)
@@ -342,8 +342,10 @@ class Authentication
                        $this->dba->update('user', ['login_date' => DateTimeFormat::utcNow()], ['uid' => $user_record['uid']]);
 
                        // Set the login date for all identities of the user
-                       $this->dba->update('user', ['login_date' => DateTimeFormat::utcNow()],
-                               ['parent-uid' => $masterUid, 'account_removed' => false]);
+                       if (!empty($masterUid)) {
+                               $this->dba->update('user', ['login_date' => DateTimeFormat::utcNow()],
+                                       ['parent-uid' => $masterUid, 'account_removed' => false]);
+                       }
                }
 
                if ($login_initial) {