General help

Users can't edit profile - required email address?

 
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Brian Gergens
Re: Users can't edit profile - required email address?
 

If no one here has any ideas, would anyone be willing to suggest somewhere else I could ask?

 
Average of ratings: -
Picture of Sean Farrell
Re: Users can't edit profile - required email address?
 

Hi Brian,

It's just a thourgh - but if the email address appears to be locked from users changing it, could the email address be locked in the admin page:

Users -> Authentication -> Manual Accounts

Perhaps there's some kind of conflict between the email address entered, the fact it is locked, and either a problem with email address validation or the "allowed domains list" or "denied domains list" in admin Users -> Authentication -> Manage Authentication.

--
Sean Farrell
Edinburgh

 
Average of ratings: -
Picture of Brian Gergens
Re: Users can't edit profile - required email address?
 

Sean,

Thanks very much for your reply. I checked Users -> Authentication -> Manual Accounts previously, and it is not locked. Just for kicks, I tried setting it to Locked and then setting it back, just to see if it would make a difference, but it did not. I also checked the allowed and denied domains list under Users -> Authentication -> Manage Authentication and both of those values are empty.

I have to admit I'm pretty puzzled as to where else to look.

-Brian

 
Average of ratings: -
Picture of Sean Farrell
Re: Users can't edit profile - required email address?
 

Hi Brian,

OK, so you are still having problems where the email field is locked for normal users editing their profile.  I assume that your users are seeing no message about "email address change pending", or anything similar.

Looking at the code which makes this form in user/edit.php and user/edit_form.php the permission required to accept email submitted email address fields is system level "moodle/user:update".  This means that I would expect that the 'Authenticated User' role would include the permission "user:update" on your moodle.

I also note in user/editlib.php that there is an exception where the email field is shown, but disabled from editing if the configuration setting "emailchangeconfirmation" is turned on and the user has a pending email address change.  However you should have seen a message about a pending address change if that was the case, and a link to cancel the change.

Other than that, the only place that I can see the email address field being disabled by being 'frozen'.

I wonder if an auth plugin is returning field_lock_email to be set, having been set in an older version of moodle, but that an upgrade to moodle means tha the email field is no longer lockable, so is not being shown as a choice in the "Manual Accounts" lock fields interface.

This would mean that $authplugin->config->field_lock_email, was set, but that it is difficult to unset directly because it is not in the list of fields.

I wonder if you could try check a line in /lib/authlib.php, and make sure that 'email', is included in the array of $userfields, just after the start of "class auth_plugin_base" (somewhere near line

You might wish to temporarily add this if it is not in the list, and try viewing the admin interface.

Alternatively temporarily replace the line in /admin/auth_config.php (somewhere near line 385).

old line:

$user_fields = $authplugin->userfields;

new lines:

//$user_fields = $authplugin->userfields;

$user_fields = array("firstname", "lastname", "email", "phone1", "phone2", "institution", "department", "address", "city", "country", "description", "idnumber", "lang");

Then check the admin / auth / manual authentication  lock / unlock fields page.

--
Sean Farrell
Edinburgh, Scotland

 
Average of ratings: -
Picture of Howard Miller
Re: Users can't edit profile - required email address?
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developers
Have you made any changes to the standard roles - even if you think it isn't related?
 
Average of ratings: -