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

Locking user profile fields bug

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.7.1
    • Fix Version/s: None
    • Component/s: Authentication, General
    • Labels:
      None
    • Affected Branches:
      MOODLE_27_STABLE

      Description

      Hi!

      Locking user profile fields is not working. Seems like a logic/typo bug.
      Example: manual auth plugin. As I understand, configuration about locking fileds is performed inside admin/auth_config.php. For set_config() hardcoded plugin name uses as plugin/name, in our example it would be 'auth/manual'. But plugin itself saves its config as 'auth_manual'. So in db table config_plugins there are both data for 'auth/manual' and for 'auth_manual'.

      1126 auth_manual expiration 0
      1127 auth_manual expiration_warning 0
      1128 auth_manual expirationtime 30
      1142 auth/manual field_lock_address locked
      1132 auth/manual field_lock_city locked
      1133 auth/manual field_lock_country locked
      1139 auth/manual field_lock_department locked

      During initialization auth plugin reads its config only for 'auth_manual' and therefore don't get anything about locking fields (because it was saved for 'auth/manual' as mentioned earlier).

      Inside admin/auth_config.php there is a trick (I think it is for compatibility):
      $frmlegacystyle = get_config('auth/'.$auth);
      $frmnewstyle = get_config('auth_'.$auth);

      Why there is no such trick inside plugin's code?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              dfx Sergey
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: