-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
2.7.1
-
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?
- duplicates
-
MDL-36987 Users should not be able to edit locked profile fields
-
- Closed
-