Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-29093

Authentication for authentication only, not for user creation

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1, 2.2
    • Fix Version/s: 2.1.2
    • Component/s: Authentication
    • Labels:
    • Environment:
      RHEL 5
    • Database:
      Any
    • Testing Instructions:
      Hide

      0 Please, if possible, test this under 21_STABLE

      1. Enable any external authentication plugin (manual and email always create the user before she has any chance to log in).
      2. Go to Site Administration >> Plugins >> Authentication >> Manage authentication
      3. Tick the ''Prevent account creation when authenticating'' checkbox and save the changes.
      4. Try to login with a user that exists and is enabled in the external authentication subsystem. We should get a message telling us that either the username or password is invalid, and login is denied.
      5. Go to Site Administration >> Plugins >> Authentication >> Manage authentication , untick the 'Authentication for authentication only' checkbox and save the changes.
      6. Try to login with the same user user than before. The user should be able to log in.

      Show
      0 Please, if possible, test this under 21_STABLE 1. Enable any external authentication plugin (manual and email always create the user before she has any chance to log in). 2. Go to Site Administration >> Plugins >> Authentication >> Manage authentication 3. Tick the ''Prevent account creation when authenticating'' checkbox and save the changes. 4. Try to login with a user that exists and is enabled in the external authentication subsystem. We should get a message telling us that either the username or password is invalid, and login is denied. 5. Go to Site Administration >> Plugins >> Authentication >> Manage authentication , untick the 'Authentication for authentication only' checkbox and save the changes. 6. Try to login with the same user user than before. The user should be able to log in.
    • Workaround:
      Hide

      The only way to do that is by editing the code:

      /moodle/lib/moodlelib.php (line 3587)

      } else

      { // if user not found, create him // Better to have an if check with option HERE //$user = create_user_record($username, $password, $auth); continue; }

      Code retrieved from: http://moodle.org/mod/forum/discuss.php?d=102711

      Show
      The only way to do that is by editing the code: /moodle/lib/moodlelib.php (line 3587) } else { // if user not found, create him // Better to have an if check with option HERE //$user = create_user_record($username, $password, $auth); continue; } Code retrieved from: http://moodle.org/mod/forum/discuss.php?d=102711
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip_MDL-29093_auth_for_auth_only_master

      Description

      There are cases that a moodle installation needs only to use (LDAP) authentication and not (LDAP) user creation.
      It would be nice to have an option for preventing automatic user creation if the administrator does't want users to be automatically created when they dont exist in the database.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  2 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Oct/11