Skip to content

Commit 918273e

Browse files
committed
Revert "Fix email syncing issue on login"
This reverts commit aded3cb.
1 parent aded3cb commit 918273e

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

Topcoder/class.topcoder.plugin.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -505,10 +505,6 @@ public function gdn_auth_startAuthenticator_handler() {
505505

506506
if ($userID) {
507507
$this->syncTopcoderRoles($userID,$topcoderRoles);
508-
if($decodedToken->hasClaim('email')) {
509-
$email = $decodedToken->getClaim('email');
510-
$this->syncTopcoderEmail($userID, $email);
511-
}
512508
Gdn::authenticator()->setIdentity($userID, true);
513509
Gdn::session()->start($userID, true);
514510
Gdn::authenticator()->trigger(Gdn_Authenticator::AUTH_SUCCESS);
@@ -663,23 +659,6 @@ private function syncTopcoderRoles($userID, $roles) {
663659
}
664660
}
665661

666-
/**
667-
* Sync a email of Topcoder user
668-
* @param $userID
669-
* @param $email Email of Topcoder user
670-
*
671-
*/
672-
private function syncTopcoderEmail($userID, $email) {
673-
$userModel = new UserModel();
674-
$user = $userModel->getID($userID, DATASET_TYPE_ARRAY);
675-
$currentEmail = val('Email', $user)
676-
677-
// Update email if there are any changes only
678-
if($currentEmail !== $email) {
679-
$userModel->setField($userID, 'Email', $email);
680-
}
681-
}
682-
683662
/**
684663
* Get a role by name and type.
685664
*

0 commit comments

Comments
 (0)