app/maguttiCms/Website/Controllers/Auth/LoginController.php
/**
     * Send the response after the user was authenticated.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Send the response after the user was authenticated.
Send the response after the user was authenticated .
protected function sendLoginResponse(Request $request)
    {
		if (StoreFeatures::isStoreEnabled())
			$cart = StoreHelper::getSessionCart();
           $request->session()->regenerate();
		if (StoreFeatures::isStoreEnabled()) {
			if ($cart) {
				$user = Auth::user();
				$cart->user()->associate($user);
				$cart->save();
				StoreHelper::setSessionCart($cart);
			}
			else {
				$cart = StoreHelper::getUserCart();
				if ($cart)
					StoreHelper::setSessionCart($cart);
			}
		}
        $this->clearLoginAttempts($request);
        return $this->authenticated($request, $this->guard()->user())
                ?: redirect()->intended($this->redirectPath());
    }
protected function sendLoginResponse ( Request $ request ) { if ( StoreFeatures :: isStoreEnabled ( ) ) $ cart = StoreHelper :: getSessionCart ( ) ; $ request -> session ( ) -> regenerate ( ) ; if ( StoreFeatures :: isStoreEnabled ( ) ) { if ( $ cart ) { $ user = Auth :: user ( ) ; $ cart -> user ( ) -> associate ( $ user ) ; $ cart -> save ( ) ; StoreHelper :: setSessionCart ( $ cart ) ; } else { $ cart = StoreHelper :: getUserCart ( ) ; if ( $ cart ) StoreHelper :: setSessionCart ( $ cart ) ; } } $ this -> clearLoginAttempts ( $ request ) ; return $ this -> authenticated ( $ request , $ this -> guard ( ) -> user ( ) ) ? : redirect ( ) -> intended ( $ this -> redirectPath ( ) ) ; }
Send the response after the user was authenticated.
Send the response after the user was authenticated .
// if the user has an active cart, store it to the new session