Changing the email address has no impact at username regardless "Email as username" toggle
closes #20459
This commit is contained in:
parent
df9cf53d2b
commit
1b8901f5a2
2 changed files with 4 additions and 3 deletions
|
@ -83,9 +83,6 @@ public abstract class AbstractUserProfileProvider<U extends UserProfileProvider>
|
|||
case ACCOUNT_OLD:
|
||||
case ACCOUNT:
|
||||
case UPDATE_PROFILE:
|
||||
if (realm.isRegistrationEmailAsUsername()) {
|
||||
return false;
|
||||
}
|
||||
return realm.isEditUsernameAllowed();
|
||||
case UPDATE_EMAIL:
|
||||
return realm.isRegistrationEmailAsUsername();
|
||||
|
|
|
@ -386,6 +386,10 @@ public class AccountRestServiceTest extends AbstractRestServiceTest {
|
|||
user = updateAndGet(user);
|
||||
assertEquals("test-user@localhost", user.getUsername());
|
||||
|
||||
user.setEmail("new@localhost");
|
||||
user = updateAndGet(user);
|
||||
assertEquals("new@localhost", user.getUsername());
|
||||
|
||||
realmRep.setRegistrationEmailAsUsername(false);
|
||||
adminClient.realm("test").update(realmRep);
|
||||
|
||||
|
|
Loading…
Reference in a new issue