Allow to override the drupal user registration settings while logging in via openid (Extended)

Created on 21 May 2018, over 6 years ago
Updated 11 March 2024, 11 months ago

Hi

Currently this module supports to create user if the site is set to "only administrators can create accounts" via open id. The administrative setting in this module "override the registration settings." to true does the work.

But in my case, we want to allow automatic registration to the site only for people logging via openid, if the site is set to "Visitors, but administrator approval is required" too. I dont want to display default Drupal "Pending approval message", while creating user via openid (Which is basically Azure AD authenticated users in my case.)

What do you think?

Thank you

πŸ’¬ Support request
Status

Needs review

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rojan raj

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¦πŸ‡ΊAustralia realityloop

    I'd like to describe a scenario where this requirement still stands.

    We have a project where there are organisational users that should be able to log in immediately, but external users that have to submit an account request that needs to be approved by the organsation before they can log in.

    To achieve this we have configured the Drupal Account settings to `Visitors, but administrator approval is required`, this allows the external users to use the account registration process and greatly reduces double handling of data.

    In openid_connect setting I have set `Override registration settings`, but I think we also need an additional switch for `Override account approval settings`.

    I'm about to start working on a patch for this.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    100 pass
  • πŸ‡¦πŸ‡ΊAustralia realityloop

    Changes made in MR!90

  • Status changed to Needs review over 1 year ago
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    100 pass
  • πŸ‡³πŸ‡ΏNew Zealand ericgsmith

    I also have a use case for extending this functionality that is a little different to what is described above.

    We have a client where the default registration setting is Visitors, but administrator approval is required but wish to override it so that we do not register accounts through open id connect.

    This is because we have very specific registration process that involves collecting additional information specific to the site, the site admin team then settings up user roles and invites or provisions the user in AD prior to approving the Drupal account, and then we rely on the Automatically connect existing users to sync the accounts. This works fine, however there is a edge case we want to prevent by overriding the registration settings with more control.

    Users may already by have an account within the organisations AD through access to other systems - if they try login prior to registering a account is created and set as blocked - and there is not enough information for the registration to be processed.

    I wondered if there would be appetite to specify the exact behaviour you want to override as - I believe that would cover the edge case above.

    E.g. - introduce a new field in the settings "Who can register accounts through OpenID connect?" that is visible only when "Override registration settings" is selected. Allow options of Nobody, Visitors and Visitors, but administrator approval is required.

    Thoughts?

  • πŸ‡³πŸ‡ΏNew Zealand ericgsmith
  • Merge request !103#2974381: Alternative approach to !90 β†’ (Open) created by ericgsmith
  • Pipeline finished with Success
    11 months ago
    Total: 146s
    #116771
  • πŸ‡³πŸ‡ΏNew Zealand ericgsmith

    I have pushed a new branch to show the alternative - not wanting to high-jack the issue or current MR but I do want to show this as a possible alternative.

    Needs additional work for an update hook to set registration_setting to visitors for sites currently using override_registration_settings - but leaving as needs review as there hasn't been any feedback on @realityloop's approach and I don't want to put any additional effort before getting feedback from maintainer that there is interest in this approach.

  • Pipeline finished with Success
    2 months ago
    Total: 149s
    #345366
Production build 0.71.5 2024