common/models/entities/User.php
public static function isExistBySlug( $slug ) {

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

		return isset( $user );
	}
public static function isExistBySlug( $slug ) {

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

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

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