[Phpcms-plugins-cvs] admin4phpCMS/modules/user class.module_user.php,1.11,1.12
Brought to you by:
mjahn
From: Martin J. <mj...@us...> - 2005-04-15 15:20:14
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20482/modules/user Modified Files: class.module_user.php Log Message: Commit as backup during development Index: class.module_user.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/user/class.module_user.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- class.module_user.php 7 Apr 2005 14:09:03 -0000 1.11 +++ class.module_user.php 15 Apr 2005 15:20:04 -0000 1.12 @@ -30,6 +30,9 @@ /* * $Log$ +* Revision 1.12 2005/04/15 15:20:04 mjahn +* Commit as backup during development +* * Revision 1.11 2005/04/07 14:09:03 mjahn * Commit as backup during development * @@ -126,7 +129,7 @@ $this->_callEvent ('CONFIG_GET', $actiondata1); $this->CONF =& $actiondata1 ['config']; - $this->_USER = new Auth('File', dirname (__FILE__).'/'.$this->CONF ['userfile']); + $this->_USER = new Auth('File', dirname (__FILE__).'/'.$this->CONF ['userfile'], '', false); $this->_USER->setShowLogin (false); $GLOBALS ['user4phpcms'] =& $this->_USER; @@ -149,17 +152,22 @@ // check for logout if (isset ($actiondata ['post'] ['logout'])) { - if (!isset ($actiondata ['post'] ['submit-login'])) { + if (!isset ($actiondata ['post'] ['submit-login']) && $this->_USER->checkAuth()) { $this->_USER->logout (); $this->_USER->start (); } } elseif (isset ($actiondata ['get'] ['logout'])) { - if (!isset ($actiondata ['post'] ['submit-login'])) { + if (!isset ($actiondata ['post'] ['submit-login']) && $this->_USER->checkAuth()) { $this->_USER->logout (); $this->_USER->start (); } } + if ($this->_USER->checkAuth()) { + $this->_userdata ['isLoggedIn'] = $this->_USER->checkAuth (); + $this->_userdata ['username'] = $this->_USER->getUsername (); + } + //check for admin-data if (isset ($actiondata ['post'] ['submit-deluser'])) { @@ -284,13 +292,13 @@ $data1 = array ('name'=>'Profile', 'module'=>'user', 'action'=>'profile'); if ($this->action == 'profile') { - $data1 ['extra'] = 'id="current"'; + $data1['extra'] = 'class="current"'; } $_data [] = $data1; - $data1 = array ('name'=>'Managment', 'module'=>'user', 'action'=>'admin'); + $data1 = array ('name'=>'Management', 'module'=>'user', 'action'=>'admin'); if ($this->action == 'admin') { - $data1 ['extra'] = 'id="current"'; + $data1['extra'] = 'class="current"'; } $_data [] = $data1; @@ -325,7 +333,7 @@ function getData (&$actiondata) { // react onto the action - $data = array ('action'=>$this->action); + $data = array ('action'=>$this->action, 'session'=>$_SESSION); switch ($this->action) { case 'admin':; |