mirror of
https://github.com/friendica/friendica
synced 2025-04-26 09:10:15 +00:00
Apply suggestions from code review
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
parent
eb1b2256a0
commit
b60c342a8f
2 changed files with 4 additions and 10 deletions
|
@ -239,11 +239,9 @@ function api_login(App $a)
|
|||
} else {
|
||||
try {
|
||||
$user_id = User::getIdFromPasswordAuthentication(trim($user), trim($password), true);
|
||||
if ($user_id !== false) {
|
||||
$record = DBA::selectFirst('user', [], ['uid' => $user_id]);
|
||||
}
|
||||
} catch (Exception $ex) {
|
||||
$record = [];
|
||||
$record = DBA::selectFirst('user', [], ['uid' => $user_id]);
|
||||
} catch (Exception $ex) {
|
||||
$record = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue