Feature #20774 » 11564_saltedpwhook_v2.diff
typo3/sysext/setup/mod/index.php (Arbeitskopie) | ||
---|---|---|
$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']) && substr($columns['password']['eval'], 0, 3) == 'tx_'))
|
||
&& !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']) && substr($columns['password']['eval'], 0, 3) == 'tx_') {
|
||
// password encryption by external script (e.g. EXT:saltedpasswords)
|
||
$func = $columns['password']['eval'];
|
||
$evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func].':&'.$func);
|
||
if (is_object($evalObj) && method_exists($evalObj, 'evaluateFieldValue')) {
|
||
$storeRec['be_users'][$BE_USER->user['uid']]['password'] = $evalObj->evaluateFieldValue($be_user_data['password2'], $is_in, $set);
|
||
}
|
||
$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.
|