Apply suggestions from code review
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
@@ -309,12 +309,8 @@ function settings_post(App $a)
|
||||
if ($email != $user['email']) {
|
||||
// check for the correct password
|
||||
try {
|
||||
$authenticated = User::getIdFromPasswordAuthentication(intval(local_user()), $_POST['mpassword']);
|
||||
User::getIdFromPasswordAuthentication(local_user(), $_POST['mpassword']);
|
||||
} catch (Exception $ex) {
|
||||
$authenticated = false;
|
||||
}
|
||||
|
||||
if (!$authenticated) {
|
||||
$err .= DI::l10n()->t('Wrong Password.');
|
||||
$email = $user['email'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user