Feature #20774 » setup_beuserpw_eval.diff
typo3/sysext/setup/mod/index.php (working copy) | ||
---|---|---|
$this->PASSWORD_UPDATED = strlen($be_user_data['password'].$be_user_data['password2'])>0 ? -1 : 0;
|
||
if ($be_user_data['email']!=$BE_USER->user['email']
|
||
|| $be_user_data['realName']!=$BE_USER->user['realName']
|
||
|| (strlen($be_user_data['password'])==32
|
||
|| ( (strlen($be_user_data['password'])==32 || (isset($columns['password']['eval']) && strpos($columns['password']['eval'], '->')))
|
||
&& !strcmp($be_user_data['password'],$be_user_data['password2']))
|
||
) {
|
||
$storeRec = array();
|
||
$BE_USER->user['realName'] = $storeRec['be_users'][$BE_USER->user['uid']]['realName'] = substr($be_user_data['realName'],0,80);
|
||
$BE_USER->user['email'] = $storeRec['be_users'][$BE_USER->user['uid']]['email'] = substr($be_user_data['email'],0,80);
|
||
if (strlen($be_user_data['password'])==32 && !strcmp($be_user_data['password'],$be_user_data['password2'])) {
|
||
$BE_USER->user['password'] = $storeRec['be_users'][$BE_USER->user['uid']]['password'] = $be_user_data['password2'];
|
||
|
||
if (isset($columns['password']['eval']) && strpos($columns['password']['eval'], '->')) {
|
||
$parts = explode('->', $columns['password']['eval']);
|
||
$storeRec['be_users'][$BE_USER->user['uid']]['password'] = call_user_func(array($parts[0], $parts[1]), $be_user_data['password2']);
|
||
$this->PASSWORD_UPDATED = 1;
|
||
} else {
|
||
if (strlen($be_user_data['password'])==32 && !strcmp($be_user_data['password'],$be_user_data['password2'])) {
|
||
$BE_USER->user['password'] = $storeRec['be_users'][$BE_USER->user['uid']]['password'] = $be_user_data['password2'];
|
||
$this->PASSWORD_UPDATED = 1;
|
||
}
|
||
}
|
||
// Make instance of TCE for storing the changes.
|