Skip to content
Snippets Groups Projects
Commit 3ee01143 authored by srosse's avatar srosse
Browse files

OO-1984: allow empty email address in profil editor

parent 84efe9ec
No related branches found
No related tags found
No related merge requests found
......@@ -423,6 +423,8 @@ public class ProfileFormController extends FormBasicController {
identityToModify = updateIdentityFromFormData(identityToModify);
changedEmail = identityToModify.getUser().getProperty("email", null);
//if ((currentEmail == null && StringHelper.containsNonWhitespace(changedEmail))
// || (currentEmail != null && !currentEmail.equals(changedEmail))) {
if (!currentEmail.equals(changedEmail)) {
// allow an admin to change email without verification workflow. usermanager is only permitted to do so, if set by config.
if ( !(ureq.getUserSession().getRoles().isOLATAdmin()
......@@ -457,9 +459,8 @@ public class ProfileFormController extends FormBasicController {
if (emailChanged) {
removeAsListenerAndDispose(dialogCtr);
String changerEMail = ureq.getIdentity().getUser().getProperty("email", ureq.getLocale());
String dialogText = "";
if(changerEMail != null && changerEMail.length() > 0 && changerEMail.equals(currentEmail)) {
if(identityToModify.equals(ureq.getIdentity())) {
dialogText = translate("email.change.dialog.text");
} else {
dialogText = translate("email.change.dialog.text.usermanager");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment