+++ b/src/Form/SocialAuthSettingsForm.php
@@ -78,7 +78,7 @@ class SocialAuth...

Contribution Date
Technology
Contribution Project
Contribution Details
  1. +++ b/src/Form/SocialAuthSettingsForm.php @@ -78,7 +78,7 @@ class SocialAuthSettingsForm extends ConfigFormBase { - $form['social_auth']['disabled_roles']['#description'] = t('No roles found.'); + $form['social_auth']['disabled_roles']['#description'] = $this->t('No roles found.'); +++ b/src/SocialAuthUserManager.php @@ -57,15 +66,92 @@ class SocialAuthUserManager { - $this->configFactory = $config_factory; - $this->loggerFactory = $logger_factory; - $this->eventDispatcher = $event_dispatcher; - $this->entityTypeManager = $entity_type_manager; ... - $this->token = $token; - $this->stringTranslation = $string_translation; - $this->transliteration = $transliteration; - $this->languageManager = $language_manager;

    This seems to be entirely unrelated to the issue. It is not too much of a change but it is still better in another issue for code cleanup.

  2. +++ b/src/SocialAuthUserManager.php @@ -57,15 +66,92 @@ class SocialAuthUserManager { + if ($drupal_user) { + // If user could be logged in. + if ($this->loginUser($drupal_user)) { + return $this->redirect('user.page'); + } + }

    This preserves the existing bug in social_auth_google module I filed - #2847914: Attempts to create an user even if it already exists. Please see the patch there.

    With the new isApprovalRequired message, the user will get a proper message the first time they login and that's great. But when they try to login next time and admin has still not approved them, then the issue remains. This code flow will try to create the user again instead of giving an error message about it.

Issue Status
Needs work
Contribution Author
Files count
0
Patches count
0