/** * Determine if an email already exists for a user * * @param string $email * @return bool */ public function emailExists($email) { return (bool) User::where('email', $email)->count(); }
/** * Find a user by its confirmation code * * @param string $code * @return \Lio\Accounts\User */ public function getByConfirmationCode($code) { return $this->model->where('confirmation_code', $code)->first(); }