summaryrefslogtreecommitdiff
path: root/includes/controller
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-07-21 13:42:19 +0200
committerGitHub <noreply@github.com>2019-07-21 13:42:19 +0200
commit43fa21f6553bb9e46f00d0768eab56e74c842bb4 (patch)
tree00df255fcd7c3777855bee27967117440c4add8c /includes/controller
parent4f60daa29568a43ab1da761d89124308dc7b37e7 (diff)
parent1e16f4c47ec15ffea41e1fa612d205b8db2a16d1 (diff)
Merge branch 'master' into docker
Diffstat (limited to 'includes/controller')
-rw-r--r--includes/controller/users_controller.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/includes/controller/users_controller.php b/includes/controller/users_controller.php
index 7c6bde02..214998dc 100644
--- a/includes/controller/users_controller.php
+++ b/includes/controller/users_controller.php
@@ -47,6 +47,7 @@ function users_controller()
function user_delete_controller()
{
$user = auth()->user();
+ $auth = auth();
$request = request();
if ($request->has('user_id')) {
@@ -68,14 +69,12 @@ function user_delete_controller()
if ($request->hasPostData('submit')) {
$valid = true;
- if (
- !(
+ if (!(
$request->has('password')
- && verify_password($request->postData('password'), $user->password, $user->id)
- )
- ) {
+ && $auth->verifyPassword($user, $request->postData('password'))
+ )) {
$valid = false;
- error(__('Your password is incorrect. Please try it again.'));
+ error(__('Your password is incorrect. Please try it again.'));
}
if ($valid) {
@@ -341,7 +340,7 @@ function user_password_recovery_set_new_controller()
}
if ($valid) {
- set_password($passwordReset->user->id, $request->postData('password'));
+ auth()->setPassword($passwordReset->user, $request->postData('password'));
success(__('Password saved.'));
$passwordReset->delete();
redirect(page_link_to('login'));