mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-05-11 15:24:54 +00:00
include PasswordStrength with namespace, fix calc of strength
This commit is contained in:
parent
ef48025001
commit
966bda05ae
|
|
@ -27,9 +27,11 @@ include("../inc/inc.Extension.php");
|
|||
include("../inc/inc.DBInit.php");
|
||||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
include("../inc/inc.ClassPasswordStrength.php");
|
||||
//include("../inc/inc.ClassPasswordStrength.php");
|
||||
include("../inc/inc.ClassPasswordHistoryManager.php");
|
||||
|
||||
use Seeddms\Seeddms\PasswordStrength;
|
||||
|
||||
if ($user->isGuest()) {
|
||||
UI::exitError(getMLText("edit_user_details"),getMLText("access_denied"));
|
||||
}
|
||||
|
|
@ -59,9 +61,12 @@ if(!seed_pass_verify($current_pwd, $user->getPwd())) {
|
|||
|
||||
if (isset($_POST["pwd"]) && ($_POST["pwd"] != "")) {
|
||||
if($settings->_passwordStrength) {
|
||||
$ps = new Password_Strength();
|
||||
$ps = new PasswordStrength();
|
||||
$ps->set_password($_POST["pwd"]);
|
||||
$ps->calculate();
|
||||
if($settings->_passwordStrengthAlgorithm == 'simple')
|
||||
$ps->simple_calculate();
|
||||
else
|
||||
$ps->calculate();
|
||||
$score = $ps->get_score();
|
||||
if($score > $settings->_passwordStrength) {
|
||||
if($settings->_passwordHistory > 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user