summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-01-05 04:08:36 +0000
committerChristopher Ng <chrng8@gmail.com>2022-01-06 23:47:42 +0000
commit19a3656fd95ea2a3ff5d00eb4332b0c8c6f71ea9 (patch)
treeb772e36e0c28097c2c5892a4cc281139b2ddd6ee /lib
parent08701853ed44814fe0fd00d0cc99478af14a23b7 (diff)
downloadnextcloud-server-19a3656fd95ea2a3ff5d00eb4332b0c8c6f71ea9.tar.gz
nextcloud-server-19a3656fd95ea2a3ff5d00eb4332b0c8c6f71ea9.zip
Fix email verification
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Accounts/AccountManager.php5
1 files changed, 4 insertions, 1 deletions
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,