Replace the function user_profile_prevent_email_change($user) in
plugins\active-directory-integration\ad-integration.php with;
/**
* Disable email field in user profile if needed (actions edit_user_profile and show_user_profile)
* This is not safe and only for cosmetic reasons, but we also have the method prevent_email_change() (see below).
*
* @param object $user
*/
public function user_profile_prevent_email_change($user)
{
// disable email field if needed (dirty hack)
if ($this->_prevent_email_change && $this->_is_adi_user($user->ID) && (!current_user_can('level_10'))) {
?>
<script type="text/javascript">
var email = document.getElementById('email');
if (email) {
email.setAttribute('disabled','disabled');
email.name = 'email_disabled';
document.getElementById('your-profile').innerHTML = document.getElementById('your-profile').innerHTML + '<input type="hidden" name="email" value="' + email.value + '"/>';
}
</script>
<?php
}
}
Thank you. Seems to work!