mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +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_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_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_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_sess' => array('title' => 'Session', 'type' => 'text', 'width' => 'auto'), // Photo
|
||||||
'user_image' => array('title' => LAN_USER_07, 'type' => 'text', 'width' => 'auto'), // Avatar
|
'user_image' => array('title' => LAN_USER_07, 'type' => 'text', 'width' => 'auto'), // Avatar
|
||||||
'user_email' => array('title' => LAN_USER_08, 'type' => 'text', 'width' => 'auto'),
|
'user_email' => array('title' => LAN_USER_08, 'type' => 'text', 'width' => 'auto'),
|
||||||
|
@@ -824,7 +824,7 @@ class e_admin_response
|
|||||||
global $HEADER, $FOOTER, $CUSTOMHEADER, $CUSTOMFOOTER;
|
global $HEADER, $FOOTER, $CUSTOMHEADER, $CUSTOMFOOTER;
|
||||||
$HEADER = $FOOTER = '';
|
$HEADER = $FOOTER = '';
|
||||||
$CUSTOMHEADER = $CUSTOMFOOTER = array();
|
$CUSTOMHEADER = $CUSTOMFOOTER = array();
|
||||||
|
//TODO generic $_GET to activate for any page of admin.
|
||||||
// New
|
// New
|
||||||
if(!defined('e_IFRAME'))
|
if(!defined('e_IFRAME'))
|
||||||
{
|
{
|
||||||
@@ -2842,6 +2842,16 @@ class e_admin_controller_ui extends e_admin_controller
|
|||||||
}
|
}
|
||||||
switch($attributes['type'])
|
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':
|
case 'datestamp':
|
||||||
if(!is_numeric($value))
|
if(!is_numeric($value))
|
||||||
{
|
{
|
||||||
|
@@ -373,8 +373,20 @@ class e107
|
|||||||
public function setDirs($e107_dirs, $e107_config_override = array())
|
public function setDirs($e107_dirs, $e107_config_override = array())
|
||||||
{
|
{
|
||||||
$override = array_merge((array) $e107_dirs, (array) $e107_config_override);
|
$override = array_merge((array) $e107_dirs, (array) $e107_config_override);
|
||||||
|
|
||||||
// override all
|
// override all
|
||||||
$this->e107_dirs = array_merge($this->defaultDirs($override), $override);
|
$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;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2035,6 +2035,7 @@ class e_form
|
|||||||
case 'url':
|
case 'url':
|
||||||
case 'email':
|
case 'email':
|
||||||
case 'text':
|
case 'text':
|
||||||
|
case 'password': // encrypts to md5 when saved.
|
||||||
$maxlength = vartrue($parms['maxlength'], 255);
|
$maxlength = vartrue($parms['maxlength'], 255);
|
||||||
unset($parms['maxlength']);
|
unset($parms['maxlength']);
|
||||||
$ret = vartrue($parms['pre']).$this->text($key, $value, $maxlength, vartrue($parms['__options'])).vartrue($parms['post']);
|
$ret = vartrue($parms['pre']).$this->text($key, $value, $maxlength, vartrue($parms['__options'])).vartrue($parms['post']);
|
||||||
|
Reference in New Issue
Block a user