[geeklog-cvs] Geeklog-2/views BaseViewFlexyUser.php,1.2,1.3

tony at iowaoutdoors.org tony at iowaoutdoors.org
Thu Mar 3 00:13:42 EST 2005


Update of /var/cvs/Geeklog-2/views
In directory www:/tmp/cvs-serv5598/views

Modified Files:
	BaseViewFlexyUser.php 
Log Message:
Sets the return URL to the Session when sending a user back to the login screen.

Index: BaseViewFlexyUser.php
===================================================================
RCS file: /var/cvs/Geeklog-2/views/BaseViewFlexyUser.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** BaseViewFlexyUser.php	20 Dec 2004 22:13:34 -0000	1.2
--- BaseViewFlexyUser.php	3 Mar 2005 05:13:40 -0000	1.3
***************
*** 50,54 ****
      public function __construct()
      {
!     	// Try to get the user object out of the session.
      	$this->user = unserialize($_SESSION['user']);
  
--- 50,56 ----
      public function __construct()
      {
!         global $glConf;
!         
!         // Try to get the user object out of the session.
      	$this->user = unserialize($_SESSION['user']);
  
***************
*** 57,61 ****
--- 59,66 ----
          if ($this->getUserRequired() AND !is_object($this->user)) {
              // NOTE this makes use of the global forward feature in MVCnPHP
+             $_SESSION['postLoginURL'] = $glConf['site_url'] . '/' . $_SERVER['REQUEST_URI'];
+             
              throw new Exception('doForward:login');
+             //return 'doForward:login';
          }
      }




More information about the geeklog-cvs mailing list