[Phpcms-plugins-cvs] admin4phpCMS/modules/user Auth_XML.xml,NONE,1.1 Perm_XML.xml,NONE,1.1 class.mod
Brought to you by:
mjahn
From: Martin J. <mj...@us...> - 2004-05-30 18:03:52
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9898/modules/user Added Files: Auth_XML.xml Perm_XML.xml class.module_user.php Log Message: restructuring of some files --- NEW FILE: Perm_XML.xml --- <?xml version="1.0"?> <!-- $Id: Perm_XML.xml,v 1.1 2004/05/30 18:03:43 mjahn Exp $ --> <liveuserPermXMLSimple> <users> <user userId="1" authUserId="c4ca4238a0b923820dcc509a6f75849b" type="1"> <rights>0,1,2,3,4,5,6,7,8</rights> </user> <user userId="2" authUserId="c4ca4238a0b923820dcc509a6f75849c" type="1"> <rights>0,3,7</rights> </user> <user userId="3" authUserId="c4ca4238a0b923820dcc509a6f7584ec" type="1"> <rights>0</rights> </user> </users> <areas> <area id="1" defineName="onlineeditor"> <right defineName="watching">0</right> <right defineName="saving">1</right> <right defineName="creating">2</right> </area> <area id="2" defineName="filemanager"> <right defineName="watching">3</right> <right defineName="creating">4</right> <right defineName="uploading">5</right> <right defineName="delete">6</right> </area> <area id="3" defineName="configuration"> <right defineName="watching">7</right> <right defineName="change">8</right> </area> </areas> </liveuserPermXMLSimple> --- NEW FILE: Auth_XML.xml --- <?xml version="1.0"?> <liveuserAuthXML> <user> <userId>c4ca4238a0b923820dcc509a6f75849b</userId> <handle>Martin Jahn</handle> <password>5f2f788f5c4f000701a40d56aaff6e36</password> <currentLogin>1047564897</currentLogin> <lastLogin>1085387296</lastLogin> <isActive>Y</isActive> </user> <user> <userId>c4ca4238a0b923820dcc509a6f75849c</userId> <handle>tester</handle> <password>f5d1278e8109edd94e1e4197e04873b9</password> <currentLogin>1047564897</currentLogin> <lastLogin>1083272950</lastLogin> <isActive>Y</isActive> </user> <user> <userId>c4ca4238a0b923820dcc509a6f75849d</userId> <handle>test</handle> <password>098f6bcd4621d373cade4e832627b4f6</password> <currentLogin>1047564897</currentLogin> <lastLogin>1083272950</lastLogin> <isActive>Y</isActive> </user> <user> <userId>c4ca4238a0b923820dcc509a6f7584ec</userId> <handle>demo</handle> <password>fe01ce2a7fbac8fafaed7c982a04e229</password> <currentLogin>1047564897</currentLogin> <lastLogin>1084467564</lastLogin> <isActive>Y</isActive> </user> </liveuserAuthXML> --- NEW FILE: class.module_user.php --- <?php require_once 'LiveUser/LiveUser.php'; class module_user extends module { function init () { $liveuserConfig = array( 'session' => array('name' => 'PHPSESSID','varname' => 'loginInfo'), 'login' => array('username' => 'handle', 'password' => 'passwd'), 'cookie' => array('name' => 'loginInfo', 'path' => '/', 'domain' => 'localhost', 'lifetime' => 60), 'autoInit' => false, 'authContainers' => array(0 => array('type' => 'XML', 'file' => dirname(__FILE__).'/Auth_XML.xml', 'loginTimeout' => 60*30, 'expireTime' => 60*60*2, 'idleTime' => 60*30, 'allowDuplicateHandles' => 0, 'passwordEncryptionMode' => 'MD5' ) ), 'permContainer' => array('type' => 'XML_Simple', 'file' => dirname(__FILE__).'/Perm_XML.xml' ) ); $this->USER = LiveUser::factory($liveuserConfig); $this->USER->init(); $this->_registerAction ('doParseParam', 'parseParam'); $this->_registerAction ('doProcess', 'process'); $this->_registerAction ('doParseMenu', 'getMenu'); $this->_registerAction ('doGetContents', 'getContent'); $this->_registerEvent ('USER_GET_DATA', 'doGetUserData'); $this->_registerAction ('doGetUserData', 'getUserData'); $this->_registerEvent ('USER_SET_DATA', 'doSetUserData'); $this->_registerAction ('doSetUserData', 'setUserData'); } function parseParam (&$actiondata) { if (isset ($actiondata['_post']['logout'])) { $this->USER->logout; } elseif (isset ($actiondata['_get']['logout'])) { $this->USER->logout (); } } function process (&$actiondata) { } function getMenu (&$actiondata) { } function getContent (&$actiondata) { if ($this->USER->isLoggedIn ()) { return true; } $actiondata = array ('id'=>'1', 'type'=>'paragraph', 'content'=>'Irgendein komischer Inhalt steht hier drin :);)'); $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); } function getUserData (&$actiondata) { } function setUserData (&$actiondata) { } } ?> |