/** * Attempt to confirm account with code * * @param string $code * * @return Illuminate\Http\Response */ public function confirm($code) { if (Confide::confirm($code)) { $notice_msg = Lang::get('confide::confide.alerts.confirmation'); return Redirect::action('UsersController@login')->with('notice', $notice_msg); } else { $error_msg = Lang::get('confide::confide.alerts.wrong_confirmation'); return Redirect::action('UsersController@login')->with('error', $error_msg); } }
public function wizard($code) { if (Confide::confirm($code)) { $user = User::where('confirmation_code', '=', $code)->pluck('email'); $user_auth = User::where('confirmation_code', '=', $code)->first(); Auth::login($user_auth); if (Auth::check()) { $urbanism_types = UrbanismType::orderBy('id', 'ASC')->lists('type', 'id'); $countries = Country::orderBy('id', 'ASC')->lists('name', 'id'); $states = State::orderBy('id', 'ASC')->lists('name', 'id'); $country_default = 'México'; $selected_country = Country::where('name', '=', $country_default)->first(); return View::make('dashboard.colonies.config.initial_config', ['urbanism_types' => $urbanism_types, 'user' => $user, 'countries' => $countries, 'states' => $states, 'code' => $code, 'selected_country' => [$selected_country->id], 'select' => ['' => 'Seleccione tipo de desarrollo'], 'select_1' => ['' => 'Seleccione País'], 'select_2' => ['' => 'Seleccione Estado'], 'select_3' => ['' => 'Seleccione Ciudad']]); } } else { $error_msg = Lang::get('confide::confide.alerts.wrong_confirmation'); return Redirect::action('UsersController@login')->with('error', $error_msg); } }
/** * Attempt to confirm account with code * * @param string $code */ public function confirm($code) { if (Confide::confirm($code)) { $notice_msg = trans('texts.confide.confirmation'); $user = User::where('confirmation_code', '=', $code)->get()->first(); $user->confirmation_code = ''; $user->save(); if ($user->public_id) { Auth::login($user); return Redirect::to('user/reset'); } else { return Redirect::action('UserController@login')->with('message', $notice_msg); } } else { $error_msg = trans('texts.confide.wrong_confirmation'); return Redirect::action('UserController@login')->with('error', $error_msg); } }
/** * Attempt to confirm account with code * * @param string $code * @return \Illuminate\Http\RedirectResponse */ public function getConfirm($code) { if (Confide::confirm($code)) { return Redirect::to('user/login')->with('notice', Lang::get('confide::confide.alerts.confirmation')); } else { return Redirect::to('user/login')->with('error', Lang::get('confide::confide.alerts.wrong_confirmation')); } }
/** * Attempt to confirm account with code * * @param string $code */ public function confirm($code) { if (Confide::confirm($code)) { $notice_msg = trans('texts.confide.confirmation'); $user = User::where('confirmation_code', '=', $code)->get()->first(); $user->confirmation_code = ''; $user->save(); if ($user->public_id) { Auth::login($user); return Redirect::to('user/reset'); } else { if (Session::has(REQUESTED_PRO_PLAN)) { Session::forget(REQUESTED_PRO_PLAN); $invitation = $this->accountRepo->enableProPlan(); return Redirect::to($invitation->getLink()); } else { return Redirect::action('UserController@login')->with('message', $notice_msg); } } } else { $error_msg = trans('texts.confide.wrong_confirmation'); return Redirect::action('UserController@login')->with('error', $error_msg); } }
public function getConfirm($code) { return Confide::confirm($code) ? Redirect::to('user/login')->with('success', Lang::get('confide::confide.alerts.confirmation')) : Redirect::to('user/login')->with('error', Lang::get('confide::confide.alerts.wrong_confirmation')); }