mirror of
https://github.com/friendica/friendica
synced 2025-04-27 08:30:10 +00:00
Revert "Remove SQL column legacy_password"
This reverts commit 82f1f2f00e
.
This commit is contained in:
parent
e860cdf6a8
commit
991a3d959e
5 changed files with 12 additions and 5 deletions
|
@ -170,12 +170,13 @@ class User
|
|||
|
||||
if (!isset($user['uid'])
|
||||
|| !isset($user['password'])
|
||||
|| !isset($user['legacy_password'])
|
||||
) {
|
||||
throw new Exception(L10n::t('Not enough information to authenticate'));
|
||||
}
|
||||
} elseif (is_int($user_info) || is_string($user_info)) {
|
||||
if (is_int($user_info)) {
|
||||
$user = dba::selectFirst('user', ['uid', 'password'],
|
||||
$user = dba::selectFirst('user', ['uid', 'password', 'legacy_password'],
|
||||
[
|
||||
'uid' => $user_info,
|
||||
'blocked' => 0,
|
||||
|
@ -185,7 +186,7 @@ class User
|
|||
]
|
||||
);
|
||||
} else {
|
||||
$user = dba::fetch_first('SELECT `uid`, `password`
|
||||
$user = dba::fetch_first('SELECT `uid`, `password`, `legacy_password`
|
||||
FROM `user`
|
||||
WHERE (`email` = ? OR `username` = ? OR `nickname` = ?)
|
||||
AND `blocked` = 0
|
||||
|
@ -276,6 +277,7 @@ class User
|
|||
'password' => $pasword_hashed,
|
||||
'pwdreset' => null,
|
||||
'pwdreset_time' => null,
|
||||
'legacy_password' => false
|
||||
];
|
||||
return dba::update('user', $fields, ['uid' => $uid]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue