From 19a3656fd95ea2a3ff5d00eb4332b0c8c6f71ea9 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Wed, 5 Jan 2022 04:08:36 +0000 Subject: Fix email verification Signed-off-by: Christopher Ng --- lib/private/Accounts/AccountManager.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/Accounts/AccountManager.php b/lib/private/Accounts/AccountManager.php index 2c7641243fa..cdfb123179e 100644 --- a/lib/private/Accounts/AccountManager.php +++ b/lib/private/Accounts/AccountManager.php @@ -388,7 +388,10 @@ class AccountManager implements IAccountManager { } catch (PropertyDoesNotExistException $e) { return; } - $oldMail = isset($oldData[self::PROPERTY_EMAIL]) ? $oldData[self::PROPERTY_EMAIL]['value']['value'] : ''; + + $oldMailIndex = array_search(self::PROPERTY_EMAIL, array_column($oldData, 'name'), true); + $oldMail = $oldMailIndex !== false ? $oldData[$oldMailIndex]['value'] : ''; + if ($oldMail !== $property->getValue()) { $this->jobList->add( VerifyUserData::class, -- cgit v1.2.3