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:
@@ -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'),
|
||||
|
@@ -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))
|
||||
{
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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']);
|
||||
|
Reference in New Issue
Block a user