public function verifyEmailWithToken($token)
    {
        $link = UserLink::where('link', $token)
            ->where('type', UserLink::VERIFY_EMAIL)
            ->first();

        if (!$link) {
            return false;
        }

        $userClass = $this->getUserClass();
        $user = $userClass::find($link->user_id);

        // enable the user and delete the verify link
        $user->enable();
        $link->delete();

        // send a welcome email
        $user->sendEmail('welcome');

        return $user;
    }