mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-06 06:49:53 -06:00
Changing the email address has no impact at username regardless "Email as username" toggle
closes #20459
This commit is contained in:
committed by
Pedro Igor
parent
1fe434664c
commit
963da364f0
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user