Exemplo n.º 1
0
 public function logout()
 {
     Auth::logout();
     $rememberMeCookie = Auth::getRecallerName();
     // Tell Laravel to forget this cookie
     $cookie = Cookie::forget($rememberMeCookie);
     return Redirect::to('/')->withCookie($cookie);
 }
Exemplo n.º 2
0
 /**
  * Responds to requests to GET /users
  */
 public function getIndex(CookieJar $cookiejar, Request $request)
 {
     //return Auth::user()->email;
     event(new DevCheckedIn(Auth::user()));
     $response = new Response(view('signup')->with(['data' => Auth::user()]));
     if (Cookie::get('success') !== false) {
         $response->withCookie(Cookie::forget('success'));
         return $response;
     }
     return $response;
     //        return view("users");
 }
Exemplo n.º 3
0
 function get()
 {
     $url = '/';
     Auth::logout();
     UserCookie::where('cookie', '=', Request::cookie('laravel-remember'))->delete();
     if (Config::get('punto-cms.c2go-login') === true) {
         $url = 'https://sso.communitytogo.com.au/logout';
         if (Config::get('punto-cms.c2go-redirect-logout') !== null) {
             $url = Config::get('punto-cms.c2go-redirect-logout');
         }
     }
     return Redirect::to($url)->withCookie(Cookie::forget('remember'))->withCookie(Cookie::forget('laravel-remember'));
 }
 /**
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 protected function confirmAccount()
 {
     $page = "Verifieer E-mail";
     if (Session::has('user') && Cookie::get('user') === null) {
         $user = Session::get('user');
         $cookie = Cookie::forever('user', $user);
         return response()->view('dividers.verification', compact('page', 'user'))->withCookie($cookie);
     }
     if (Cookie::get('user') !== null) {
         $user = Cookie::get('user');
         $userIs = User::where('email', $user->email)->first();
         if ($userIs !== null && $userIs->verified) {
             return Redirect::to('login')->withCookie(Cookie::forget('user'));
         }
         return view('dividers.verification', compact('page', 'user'));
     }
 }
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (Cookie::has('dataFromSever')) {
         $dataFromSever = Cookie::get('dataFromSever');
         if ($dataFromSever['data']['role']['partner'] == 1) {
             return $next($request);
         } elseif ($dataFromSever['data']['role']['admin'] == 1) {
             return redirect()->back();
         } else {
             $cookie = Cookie::forget('dataFromSever');
             session_start();
             session_destroy();
             return redirect()->route('get.auth.auth.login')->withCookie($cookie)->with('message_error', 'Bạn không có quyền truy cập vào dành cho người quản lý');
         }
     }
     return redirect()->route('get.auth.auth.login')->with('message_error', 'Phiên làm việc của bạn đã bị hết. Vui lòng đăng nhập lại');
 }
Exemplo n.º 6
0
 /**
  * @return mixed
  */
 public function destroyCookie()
 {
     return Cookie::forget($this->info[CookieManager::COOKIE_NAME]);
 }
Exemplo n.º 7
0
 public function logout()
 {
     $this->refreshRememberLoginToken($this->getPerson());
     $this->session->remove($this->getSessionKey());
     Cookie::queue(Cookie::forget($this->getAutoLoginCookie()));
     $this->person = new Guest();
     return $this;
 }
 /**
  * delete the count cookie
  * @return Response object
  */
 public function destroyCookie()
 {
     $cookie = Cookie::forget('count');
     $response = new Response($cookie);
     $response->withCookie($cookie);
     return $response;
 }
Exemplo n.º 9
0
 public function forgetGlobalCartOrder()
 {
     Cookie::forget('goprop_order_id');
 }
Exemplo n.º 10
0
 public function removePassword()
 {
     if ($this->manhgiay->password != "") {
         if (is_null($this->request->cookie($this->slug))) {
             return redirect($this->slug . '/login');
         }
         if (Hash::check($this->request->cookie($this->slug), $this->manhgiay->password)) {
             $this->manhgiay->password = "";
             $this->manhgiay->save();
             return redirect(str_slug($this->slug))->withCookie(Cookie::forget($this->slug));
         }
     }
     $this->manhgiay->password = "";
     $this->manhgiay->save();
     return redirect(str_slug($this->slug))->withCookie(Cookie::forget($this->slug));
 }
Exemplo n.º 11
0
 public function cikisYap()
 {
     Session::flush();
     Cookie::forget('user');
     return \Redirect::to('admin');
 }