public function exists(UserInterface $user, $code = null)
{
$expires = $this->expires();
$activation = $this->createModel()->newQuery()->where('user_id', $user->getUserId())->where('completed', false)->where('created_at', '>', $expires);
if ($code) {
$activation->where('code', $code);
}
return $activation->first() ?: false;
}