]> git.mxchange.org Git - friendica.git/blobdiff - mod/settings.php
Split and delete `ModuleController`
[friendica.git] / mod / settings.php
index b1b8abd94e630a6f9c1ff44293dcfc1ffd4bee3f..080bcdeb93848a7cc086c60798583752a3b17be3 100644 (file)
@@ -308,7 +308,9 @@ function settings_post(App $a)
 
        if ($email != $user['email']) {
                //  check for the correct password
-               if (!User::authenticate(intval(local_user()), $_POST['mpassword'])) {
+               try {
+                       User::getIdFromPasswordAuthentication(local_user(), $_POST['mpassword']);
+               } catch (Exception $ex) {
                        $err .= DI::l10n()->t('Wrong Password.');
                        $email = $user['email'];
                }