mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
empty password in csv file will not override an existing password
This commit is contained in:
parent
9e36d82873
commit
0e712c1554
|
@ -45,7 +45,8 @@ function renderBooleanData($colname, $objdata) { /* {{{ */
|
|||
} /* }}} */
|
||||
|
||||
function getPasswordPlainData($colname, $coldata, $objdata) { /* {{{ */
|
||||
$objdata['passenc'] = seed_pass_hash($coldata);
|
||||
/* Setting 'passenc' to null will not update the password */
|
||||
$objdata['passenc'] = $coldata ? seed_pass_hash($coldata) : null;
|
||||
return $objdata;
|
||||
} /* }}} */
|
||||
|
||||
|
@ -245,7 +246,7 @@ if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) {
|
|||
if($makeupdate)
|
||||
$eu->setEmail($u['email']);
|
||||
}
|
||||
if(isset($u['passenc']) && $u['passenc'] != $eu->getPwd()) {
|
||||
if(isset($u['passenc']) && !is_null($u['passenc']) && $u['passenc'] != $eu->getPwd()) {
|
||||
$log[$uhash][] = array('id'=>$eu->getLogin(), 'type'=>'success', 'msg'=> "Encrypted password of user updated. '".$u['passenc']."' != '".$eu->getPwd()."'");
|
||||
if($makeupdate)
|
||||
$eu->setPwd($u['passenc']);
|
||||
|
|
Loading…
Reference in New Issue
Block a user