1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-20 13:21:54 +02:00

Issue #595 - Use PHP 5.5+ password methods when available. User password field expanded to 255 chars. Fixes issue with salt password being updated via User > Edit User.

This commit is contained in:
Cameron
2016-06-06 19:54:48 -07:00
parent 32bd1d04ab
commit 127271e9fc
6 changed files with 229 additions and 86 deletions

View File

@@ -1375,7 +1375,23 @@ $text .= "
<tr>
<td><label for='passwordencoding'>".PRFLAN_188.":</label></td>
<td>
".$frm->radio_switch('passwordEncoding', varset($pref['passwordEncoding'], 0), PRFLAN_190, PRFLAN_189)."
";
$pwdEncodeOpts = array();
if(function_exists('password_verify')) // ie. php 5.5 or higher
{
$pwdEncodeOpts[3] = "PHP Default (Preferred)";
}
$pwdEncodeOpts[1] = PRFLAN_190;
$pwdEncodeOpts[0] = PRFLAN_189;
$text .= $frm->select('passwordEncoding', $pwdEncodeOpts, varset($pref['passwordEncoding'], 0));
// $text .= $frm->radio_switch('passwordEncoding', varset($pref['passwordEncoding'], 0), PRFLAN_190, PRFLAN_189);
$text .= "
<div class='smalltext field-help'>".PRFLAN_191."</div>
</td>
</tr>