public static function findByEmail($email, $checkStatus = true)
    {
        return static::findOne(
            $checkStatus ?
                ['email' => $email, 'status' => self::STATUS_ACTIVE] :
                ['email' => $email]
        );
    }
public static function findByEmail($email, $checkStatus = true)
    {
        return static::findOne(
            $checkStatus ?
                ['email' => $email, 'status' => self::STATUS_ACTIVE] :
                ['email' => $email]
        );
    }
public static function findByEmail ( $ email , $ checkStatus = true ) { return static :: findOne ( $ checkStatus ? [ 'email' => $ email , 'status' => self :: STATUS_ACTIVE ] : [ 'email' => $ email ] ) ; }
Finds user by email

@param string $email
@param bool $checkStatus
@return null|static
Finds user by email