public static function findByEmailToken($token)
    {
        if (!static::isEmailTokenValid($token)) {
            return null;
        }
        return static::find()->where(['email_token' => $token, 'status' => self::STATUS_ACTIVE])->limit(1)->one();
    }
public static function findByEmailToken($token)
    {
        if (!static::isEmailTokenValid($token)) {
            return null;
        }
        return static::find()->where(['email_token' => $token, 'status' => self::STATUS_ACTIVE])->limit(1)->one();
    }
public static function findByEmailToken ( $ token ) { if ( ! static :: isEmailTokenValid ( $ token ) ) { return null ; } return static :: find ( ) -> where ( [ 'email_token' => $ token , 'status' => self :: STATUS_ACTIVE ] ) -> limit ( 1 ) -> one ( ) ; }
Finds active user by email token.
@param string $token activation token
@return static|null
Finds active user by email token .