src/Administration.php
public function logInAsUserByUsername($username) {
		$numberOfMatchedUsers = $this->logInAsUserByColumnValue('username', \trim($username));

		if ($numberOfMatchedUsers === 0) {
			throw new UnknownUsernameException();
		}
		elseif ($numberOfMatchedUsers > 1) {
			throw new AmbiguousUsernameException();
		}
	}
public function logInAsUserByUsername($username) {
		$numberOfMatchedUsers = $this->logInAsUserByColumnValue('username', \trim($username));

		if ($numberOfMatchedUsers === 0) {
			throw new UnknownUsernameException();
		}
		elseif ($numberOfMatchedUsers > 1) {
			throw new AmbiguousUsernameException();
		}
	}
public function logInAsUserByUsername ( $ username ) { $ numberOfMatchedUsers = $ this -> logInAsUserByColumnValue ( 'username' , \ trim ( $ username ) ) ; if ( $ numberOfMatchedUsers === 0 ) { throw new UnknownUsernameException ( ) ; } elseif ( $ numberOfMatchedUsers > 1 ) { throw new AmbiguousUsernameException ( ) ; } }
Signs in as the user with the specified display name

@param string $username the display name of the user to sign in as
@throws UnknownUsernameException if no user with the specified username has been found
@throws AmbiguousUsernameException if multiple users with the specified username have been found
@throws EmailNotVerifiedException if the user has not verified their email address via a confirmation method yet
@throws AuthError if an internal problem occurred (do *not* catch)
Signs in as the user with the specified display name