public function sendVerificationEmail(UserInterface $user)
    {
        $params = [
            'user_id' => $user->id(),
            'type' => UserLink::VERIFY_EMAIL,
        ];

        // delete previous verify links
        $this->getDatabase()
            ->delete('UserLinks')
            ->where($params)
            ->execute();

        // create new verification link
        $link = new UserLink();
        $link->create($params);

        // email it
        return $user->sendEmail('verify-email',
            ['verify' => $link->link]);
    }