/** * Confirm the user (usually means that the user) * email is valid. Sets the confirmed attribute of * the user to true and also update the database. * * @return bool Success. */ public function confirm() { $this->confirmed = true; return ConfideFacade::confirm($this->confirmation_code); }
/** * Attempt to confirm the account with code * * @param string $code * * @return boolean */ public function confirm($code) { $user = User::where('confirmation_code', $code)->first(); if (!$user['confirmed']) { return Confide::confirm($code); } return false; }