- if ( $req ) {
- if ( $req->username !== null && $req->password !== null ) {
- // Nothing we can do yet, because the user isn't in the DB yet
- if ( $req->username !== $user->getName() ) {
- $req = clone $req;
- $req->username = $user->getName();
- }
-
- if ( $req->mailpassword ) {
- // prevent EmailNotificationSecondaryAuthenticationProvider from sending another mail
- $this->manager->setAuthenticationSessionData( 'no-email', true );
- }
+ if ( $req && $req->username !== null && $req->password !== null ) {
+ // Nothing we can do yet, because the user isn't in the DB yet
+ if ( $req->username !== $user->getName() ) {
+ $req = clone $req;
+ $req->username = $user->getName();
+ }