common/models/entities/User.php
public static function isExistByUsername( $username ) {

		$user = self::find()->where( 'username=:username', [ ':username' => $username ] )->one();

		return isset( $user );
	}
public static function isExistByUsername( $username ) {

		$user = self::find()->where( 'username=:username', [ ':username' => $username ] )->one();

		return isset( $user );
	}
public static function isExistByUsername ( $ username ) { $ user = self :: find ( ) -> where ( 'username=:username' , [ ':username' => $ username ] ) -> one ( ) ; return isset ( $ user ) ; }
Check whether user exist for given username.

@param string $username
@return boolean
Check whether user exist for given username .