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

Locking user profile fields bug

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.7.1
    • Authentication, General
    • None
    • MOODLE_27_STABLE

      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?

            Unassigned Unassigned
            dfx Dfx (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.