1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Admin-ui type 'password' added. Password modification now possible via admin->users. Installed Media path issue corrected.

This commit is contained in:
CaMer0n
2012-07-18 03:47:28 +00:00
parent d8b956152e
commit 79224fe54d
4 changed files with 25 additions and 2 deletions

View File

@@ -683,7 +683,7 @@ class users_admin_ui extends e_admin_ui
'user_loginname' => array('title' => LAN_USER_02, 'type' => 'text', 'width' => 'auto'), // User name
'user_login' => array('title' => LAN_USER_03, 'type' => 'text', 'width' => 'auto'), // Real name (no real vetting)
'user_customtitle' => array('title' => LAN_USER_04, 'type' => 'text', 'width' => 'auto'), // No real vetting
// 'user_password' => array('title' => LAN_USER_05, 'type' => 'text', 'width' => 'auto'), //TODO add md5 option to form handler?
'user_password' => array('title' => LAN_USER_05, 'type' => 'password', 'width' => 'auto'), //TODO add md5 option to form handler?
'user_sess' => array('title' => 'Session', 'type' => 'text', 'width' => 'auto'), // Photo
'user_image' => array('title' => LAN_USER_07, 'type' => 'text', 'width' => 'auto'), // Avatar
'user_email' => array('title' => LAN_USER_08, 'type' => 'text', 'width' => 'auto'),

View File

@@ -824,7 +824,7 @@ class e_admin_response
global $HEADER, $FOOTER, $CUSTOMHEADER, $CUSTOMFOOTER;
$HEADER = $FOOTER = '';
$CUSTOMHEADER = $CUSTOMFOOTER = array();
//TODO generic $_GET to activate for any page of admin.
// New
if(!defined('e_IFRAME'))
{
@@ -2842,6 +2842,16 @@ class e_admin_controller_ui extends e_admin_controller
}
switch($attributes['type'])
{
case 'password': //TODO more encryption options.
if(strlen($value) < 30) // expect a non-md5 value if less than 32 chars.
{
$value = md5($value);
}
break;
case 'datestamp':
if(!is_numeric($value))
{

View File

@@ -373,8 +373,20 @@ class e107
public function setDirs($e107_dirs, $e107_config_override = array())
{
$override = array_merge((array) $e107_dirs, (array) $e107_config_override);
// override all
$this->e107_dirs = array_merge($this->defaultDirs($override), $override);
if(strpos($this->e107_dirs['MEDIA_DIRECTORY'],$this->site_path) === false)
{
$this->e107_dirs['MEDIA_DIRECTORY'] .= $this->site_path."/"; // multisite support.
}
if(strpos($this->e107_dirs['SYSTEM_DIRECTORY'],$this->site_path) === false)
{
$this->e107_dirs['SYSTEM_DIRECTORY'] .= $this->site_path."/"; // multisite support.
}
return $this;
}

View File

@@ -2035,6 +2035,7 @@ class e_form
case 'url':
case 'email':
case 'text':
case 'password': // encrypts to md5 when saved.
$maxlength = vartrue($parms['maxlength'], 255);
unset($parms['maxlength']);
$ret = vartrue($parms['pre']).$this->text($key, $value, $maxlength, vartrue($parms['__options'])).vartrue($parms['post']);