code: public static function findByUsernameOrEmail($emailOrUsername)
  	{
  		if (filter_var($emailOrUsername, FILTER_VALIDATE_EMAIL)) {
  			return UserIdentity::findByEmail($emailOrUsername);
  		}
  
  		return UserIdentity::findByUsername($emailOrUsername);
  	}
docs: Finds user by either username or email
  
  @param string $emailOrUsername
  
  @return \abhimanyu\user\models\UserIdentity|null