Code Duplication    Length = 7-8 lines in 2 locations

includes/auth/AuthManager.php 1 location

@@ 1647-1654 (lines=8) @@
1644
					}
1645
					$status = Status::newGood();
1646
					$status->warning( 'userexists' );
1647
				} else {
1648
					$this->logger->error( __METHOD__ . ': {username} failed with message {message}', [
1649
						'username' => $username,
1650
						'message' => $status->getWikiText( null, null, 'en' )
1651
					] );
1652
					$user->setId( 0 );
1653
					$user->loadFromId();
1654
				}
1655
				return $status;
1656
			}
1657
		} catch ( \Exception $ex ) {

includes/auth/AuthManagerAuthPlugin.php 1 location

@@ 134-140 (lines=7) @@
131
		$reqs = AuthenticationRequest::loadRequestsFromSubmission( $reqs, $data );
132
		foreach ( $reqs as $req ) {
133
			$status = AuthManager::singleton()->allowsAuthenticationDataChange( $req );
134
			if ( !$status->isOk() ) {
135
				$this->logger->info( __METHOD__ . ': Password change rejected: {reason}', [
136
					'username' => $data['username'],
137
					'reason' => $status->getWikiText( null, null, 'en' ),
138
				] );
139
				return false;
140
			}
141
		}
142
		foreach ( $reqs as $req ) {
143
			AuthManager::singleton()->changeAuthenticationData( $req );