Code Duplication    Length = 7-8 lines in 2 locations

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 );

includes/auth/AuthManager.php 1 location

@@ 1632-1639 (lines=8) @@
1629
					}
1630
					$status = Status::newGood();
1631
					$status->warning( 'userexists' );
1632
				} else {
1633
					$this->logger->error( __METHOD__ . ': {username} failed with message {message}', [
1634
						'username' => $username,
1635
						'message' => $status->getWikiText( null, null, 'en' )
1636
					] );
1637
					$user->setId( 0 );
1638
					$user->loadFromId();
1639
				}
1640
				return $status;
1641
			}
1642
		} catch ( \Exception $ex ) {