Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/user
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19290/modules/user
Modified Files:
class.module_user.php
Added Files:
module.ini
Log Message:
beginning of phpcms-content and filemanager
--- NEW FILE: module.ini ---
userfile = "user.db"
permfile = "perm.db"
Index: class.module_user.php
===================================================================
RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/user/class.module_user.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- class.module_user.php 20 May 2005 05:54:05 -0000 1.14
+++ class.module_user.php 26 May 2005 15:55:55 -0000 1.15
@@ -30,6 +30,9 @@
/*
* $Log$
+* Revision 1.15 2005/05/26 15:55:55 mjahn
+* beginning of phpcms-content and filemanager
+*
* Revision 1.14 2005/05/20 05:54:05 mjahn
* last step for module_phpcms
*
@@ -100,6 +103,7 @@
**/
class module_user extends module {
+ var $_CONF = array ('userfile'=>'user.db', 'permfile'=>'perm.db');
/**
* @var object $_USER reference to the user- and permission-managment-object
* @access private
@@ -131,11 +135,9 @@
$this->_registerAction ('doGetUserStatus', 'getUserStatus');
// get module-config from config-module
- $actiondata1 = array ('module'=>'user');
- $this->_callEvent ('CONFIG_GET', $actiondata1);
- $this->CONF =& $actiondata1 ['config'];
-
- $this->_USER = new Auth('File', dirname (__FILE__).'/'.$this->CONF ['userfile'], '', false);
+ $this->_CONF = array_merge ($this->_CONF, parse_ini_file (dirname (__FILE__).'/module.ini'));
+
+ $this->_USER = new Auth('File', dirname (__FILE__).'/'.$this->_CONF ['userfile'], '', false);
$this->_USER->setShowLogin (false);
$GLOBALS ['user4phpcms'] =& $this->_USER;
@@ -145,7 +147,8 @@
/**
* Parse the URI-params
*
- * @param array $actiondata $actiondata contains the URI-param-arrays
+ * @param array $actiondata $actiondata contains the URI-param-arrays
+ * @todo implement a login function for all the login-attempts due to security-reasons
**/
function parseParam (&$actiondata) {
@@ -179,22 +182,22 @@
if (true || $this->_USER->getUsername () == 'Martin Jahn') {
- $this->_selectedUser = array ();
-
- if ($actiondata ['post'] ['submit-deluser'] == -1) {
- // delete multiple user
- $this->adminAction = 'delete-user';
- foreach ($actiondata ['post'] as $id=>$value) {
- if (substr ($id, 0, 12) != 'select-user-') {
- continue;
+ $this->_selectedUser = array ();
+
+ if ($actiondata ['post'] ['submit-deluser'] == -1) {
+ // delete multiple user
+ $this->adminAction = 'delete-user';
+ foreach ($actiondata ['post'] as $id=>$value) {
+ if (substr ($id, 0, 12) != 'select-user-') {
+ continue;
+ }
+ $this->_selectedUser [] = substr ($id, 12);
}
- $this->_selectedUser [] = substr ($id, 12);
+ } else {
+ // delete one user
+ $this->adminAction = 'delete-user';
+ $this->_selectedUser = array ($actiondata ['post'] ['submit-deluser']);
}
- } else {
- // delete one user
- $this->adminAction = 'delete-user';
- $this->_selectedUser = array ($actiondata ['post'] ['submit-deluser']);
- }
}
}
|