summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-01-05 04:08:36 +0000
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2022-01-07 10:52:36 +0000
commitc699f1bec2d1bee62fd141c91b6dab8ae0b7754c (patch)
tree069719ff59d2c4441f48b70842914b573e711c4d /lib/private
parentdeeee361327e523a07da2298eb44c88051fa87c7 (diff)
downloadnextcloud-server-c699f1bec2d1bee62fd141c91b6dab8ae0b7754c.tar.gz
nextcloud-server-c699f1bec2d1bee62fd141c91b6dab8ae0b7754c.zip
Fix email verification
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'lib/private')
-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,