From 9ce9e31f9def7184a0d7139cd6fcd5cd6c4935c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Roy?= Date: Thu, 9 Jan 2020 22:00:56 +0100 Subject: [PATCH] No longer require password field for onUpdate handler This allow to break the account edition into multiple partials, and still uses the onUpdate handler, having for instance one page only for e-mail editing. Before, error was thrown line 422 when missing password field. --- components/Account.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Account.php b/components/Account.php index ca18422d..d50a6666 100644 --- a/components/Account.php +++ b/components/Account.php @@ -419,7 +419,7 @@ public function onUpdate() /* * Password has changed, reauthenticate the user */ - if (strlen($data['password'])) { + if (array_key_exists('password', $data) && strlen($data['password'])) { Auth::login($user->reload(), true); }