public function logout() { if (Sentry::check()) { Sentry::logout(); } return Redirect::to('/'); }
public function action_logout() { if (Sentry::check()) { Sentry::logout(); echo json_encode(array('status' => 'ok')); } }
public function logout() { //Logout User Sentry::logout(); //Redirect user ke halaman Login return Redirect::to('/')->with('successMessage', 'Anda Berhasil logout.'); }
public function logout() { // logout user Sentry::logout(); // Redirect user ke halaman login return Redirect::to('login')->with('successMessage', 'Anda berhasil logout'); }
public function getLogout() { if (Sentry::check()) { Sentry::logout(); return Redirect::route('index'); } }
public function before() { parent::before(); // if user not connected and not on the login, 404 or session_up pages then redirect to login page if (Request::active()->action != 'login' && !Sentry::check() && Request::active()->action != '404' && Request::active()->action != 'session_up') { Session::set(array('redirect' => Request::active()->route->translation)); Response::redirect('login'); } $this->current_user = self::current_user(); View::set_global('current_user', self::current_user()); if (Sentry::check()) { // logout if banned if (Sentry::attempts($this->current_user->username)->get() == Sentry::attempts()->get_limit()) { Session::set_flash('Your account has been blocked'); Sentry::logout(); Response::redirect('login'); } } View::set_global('site_title', 'IKON Backend'); View::set_global('separator', '/'); foreach (Model_Forms::find('all') as $k => $form) { $this->tables[$k]['cleanName'] = $form->cleanName; $this->tables[$k]['url'] = $form->url; $this->tables[$k]['table'] = $form->table; } View::set_global('tables', $this->tables); }
/** * @description if logged in will logout session and redirect to /index * @return void or redirects to login page */ public function logoutAction() { if (Sentry::check()) { Sentry::logout(); return $this->response->redirect('index'); } }
/** * Logout page. * * @return Redirect */ public function getLogout() { // Log the user out Sentry::logout(); // Redirect to the users page return Redirect::route('home')->with('flash_error', 'Good Bye !'); }
/** * Remove the specified session from storage. * * @param int $id * @return Response */ public function destroy() { if (!Sentry::getUser()) { return Redirect::route('sessions.create'); } Sentry::logout(); return Redirect::route('sessions.create'); }
public function logout() { try { Sentry::logout(); $data = Citrus::response('success', 1); } catch (Exception $e) { $data = Citrus::response('error', $e); } return $data; }
public function action_logout() { if (Sentry::login()) { Session::set_flash('success', 'successfuly logged out'); Sentry::logout(); } else { Session::set_flash('warning', 'You\'re not logged in'); Response::redirect(''); } }
public function before() { //remove all data from previus installation.... Sentry::logout(); Config::load('Sentry', true); Cookie::delete('sentry_rm'); Session::delete(Config::get('sentry.session.user')); Session::delete(Config::get('sentry.session.provider')); parent::before(); }
/** * Default preparation for each test */ public function setUp() { parent::setUp(); // Migrate database Artisan::call('migrate'); // Do not send mails Mail::pretend(true); // To create test models Model::unguard(); // Logout - just to be sure \Sentry::logout(); }
/** * Test the two basic user types * */ public function testBasicUserTypes() { $this->assertTrue(Sentry::getUser() == NULL, 'User should not be logged in initially.'); $admin = Sentry::findUserByLogin($this->adminEmail); $this->assertTrue($admin != NULL, 'Admin account not found.'); $user = Sentry::findUserByLogin($this->userEmail); $this->assertTrue($user != NULL, 'User account not found.'); Sentry::setUser($user); $this->assertTrue(Sentry::check(), 'User not logged in.'); Sentry::setUser($admin); $this->assertTrue(Sentry::check(), 'Admin not logged in.'); Sentry::logout(); }
public function doUserLogout() { Sentry::logout(); return Response::json(array()); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id = null) { Sentry::logout(); return Redirect::intended('/'); }
public function get_logout() { Sentry::logout(); return Redirect::to(URL::to_route('home.index')); }
/** * Display a listing of the resource. * * @return Response */ public function getLogout() { \Sentry::logout(); return Redirect::route('admin.bejelentkezes'); }
/** * The module index * * @return Response */ public function action_index() { \Sentry::logout(); \Messages::success('You have successfully logged out'); \Response::redirect('admin/login'); }
public function getLogout() { Sentry::logout(); return Redirect::route("login_get"); }
/** * Update User Email * @return Redirect */ public function postChangeEmail() { //Get the user id of the currently logged in user $userId = \Sentry::getUser()->id; //Get new email $newEmail = \Input::get('newEmail'); //Change Email $result = $this->user->changeMyEmail($userId, $newEmail); if ($result == 'success') { //Log out to verify new email address \Sentry::logout(); return \Redirect::to('/login'); } if ($result == 'error') { //Email Already Exists in the database \Log::error("Someting Went Wrong: Email Alredy exists."); throw new \SomethingWentWrongException(); } }
$menu = Galeria::where('menu', '=', 'Si')->orderBy('order')->get(); return View::make('serie', array('cita' => $cita, 'imagenes' => $items, 'galeria' => $galeria, 'menu' => $menu, 'subgalerias' => $subgalerias)); }); Route::get('/sub/{id}', function ($id) { $cita = Cita::orderBy('created_at', 'desc')->first(); $subGaleria = SubGaleria::find($id); $sql = "\n\n SELECT id, galeria_id, imagen, null as video, null as poster, null as audio, titulo, 'imagen' as tipo, created_at FROM imagenes WHERE subcategoria_id = {$id} \n UNION \n SELECT id, galeria_id, null as imagen, video, poster, null as audio, titulo, 'video' as tipo, created_at FROM videos WHERE subcategoria_id = {$id} \n UNION \n SELECT id, galeria_id, null as imagen, null as video, null as poster, audio, titulo, 'audio' as tipo, created_at FROM audios WHERE subcategoria_id = {$id} ORDER BY created_at desc"; $items = DB::select($sql); $galeria = Galeria::find($subGaleria->galeria_id); $menu = Galeria::where('menu', '=', 'Si')->orderBy('order')->get(); return View::make('serie', array('cita' => $cita, 'imagenes' => $items, 'galeria' => $galeria, 'subGaleria' => $subGaleria, 'menu' => $menu)); }); Route::get('user/login', function () { return View::make('login'); }); Route::get('user/logout', function () { Sentry::logout(); return View::make('login'); }); Route::post('user/login', function () { // Set login credentials $credentials = array('email' => Input::get('email'), 'password' => Input::get('password')); $remember = Input::get('remember') ? true : false; // Try to authenticate the user $user = Sentry::authenticate($credentials, $remember); return Redirect::intended('/admin/imagenes'); }); Route::post('user/logout', function () { Sentry::logout(); return Redirect::to('user/login'); });
public function logout() { Sentry::logout(); return Redirect::route('users.login'); }
public function logout() { Sentry::logout(); return Redirect::to('auth/login')->with('success', 'Successfully logged out.'); }
/** * Create user * * @access public * @return void */ public function action_signup() { $settings = \Config::load('autoresponder.db'); //if (!(\Sentry::check() && !\Sentry::user()->is_admin())) if ($this->check_logged_type() != 'user') { if (\Sentry::check()) { \Sentry::logout(); } \View::set_global('title', 'Registration'); if (\Input::post('signup')) { $val = \User\Controller_Validate::forge('create'); // $val->set_message('unique', 'It appears you have already registered using this email address.'); if ($val->run()) { // Get POST values $insert = \Input::post(); array_walk($insert, create_function('&$val', '$val = trim($val);')); try { $username = $insert['email']; $email = $insert['email']; $password = $insert['password']; $user_group = $insert['user_group']; unset($insert['signup'], $insert['user_group'], $insert['username'], $insert['email'], $insert['password'], $insert['confirm_password'], $insert['confirm_email'], $insert['terms']); // create the user - no activation required $vars = array('username' => $username, 'email' => $email, 'password' => $password, 'metadata' => $insert); $user_registration = \Sentry::user()->register($vars); $user = \Sentry::user($user_registration['id']); // Add user to 'customer' group (id = 3) if ($user_registration and $user->add_to_group($user_group)) { if (true) { $email_data = array('site_title' => \Config::get('site_title'), 'customer_name' => ucwords($insert['first_name']), 'phone' => $insert['phone'], 'activation_link' => \Uri::front_create('user/activate/' . $user_registration['hash'])); // Send email to user $email_sent = \App\Emailer::send_email_to_user($vars['email'], $email_data['customer_name'], 'Activate your account with ' . $settings['website'], '_email/user_register_confirm', $email_data); // Send email to admins \App\Emailer::send_email_to_group('register', 'Activate your account with ' . $settings['website'], '_email/user_register_confirm', $email_data); if ($email_sent) { // \Messages::success('Welcome ' . $email_data['customer_name'] . ' to ' . $email_data['site_title'] . ', thank you for registering with us. An email has been sent to ' . $vars['email'] . ' with your account information.'); \Messages::success('Thanks for registering with Evan Evans. We have sent an email to your nominated address with a link to activate your account. Sometimes inboxes can be a little overprotective so you may need to check your junk or spam folders.'); } // else // { // \Messages::error('An error occurred while sending email, please try again later.'); // } } \Response::redirect(\Input::referrer(\Uri::front_create('user/login'))); } } catch (\Sentry\SentryException $e) { // show validation errors //\Messages::error('<h4>There was an error while trying to create user</h4>'); $errors = $e->getMessage(); \Messages::error($errors); } } else { if ($val->error() != array()) { // show validation errors //\Messages::error('<h4>There was an error while trying to create user</h4>'); foreach ($val->error() as $e) { \Messages::error($e->get_message()); } } } } if (\Input::is_ajax()) { // We need to save an user inputs in database for advertising use if (\Input::post()) { // Get POST values $insert = \Input::post(); array_walk($insert, create_function('&$val', '$val = trim($val);')); if ($insert['first_name'] || $insert['last_name'] || $insert['email']) { $insert['created_at'] = time(); \DB::insert('users_tmp')->set($insert)->execute(); } } echo \Theme::instance()->view($this->view_dir . 'signup'); } else { \Theme::instance()->set_partial('content', $this->view_dir . 'single_signup'); } } else { //Keep existing messages \Messages::instance()->shutdown(); \Response::redirect(\Uri::front_create('user/account/dashboard')); } }
/** * signout * */ public function getSignOut() { Sentry::logout(); return Redirect::route('home'); }
public function Logout() { Sentry::logout(); return array('success' => TRUE); }
/** * Logout action * @return Redirect */ public function getLogout() { Sentry::logout(); return Redirect::route('admin.login'); }
/** * Sentry logout * */ public function logout() { Sentry::logout(); return Redirect::route('home.index'); }
public function actionLogout() { Sentry::logout(); return Redirect::route('login'); }