Improvement change of function hashPassword
This commit is contained in:
@@ -1189,7 +1189,7 @@ class wsBase
|
|||||||
$arrayData = array ();
|
$arrayData = array ();
|
||||||
|
|
||||||
$arrayData["USR_USERNAME"] = $userName;
|
$arrayData["USR_USERNAME"] = $userName;
|
||||||
$arrayData["USR_PASSWORD"] = Bootstrap::hasPassword( $password );
|
$arrayData["USR_PASSWORD"] = Bootstrap::hashPassword( $password );
|
||||||
$arrayData["USR_FIRSTNAME"] = $firstName;
|
$arrayData["USR_FIRSTNAME"] = $firstName;
|
||||||
$arrayData["USR_LASTNAME"] = $lastName;
|
$arrayData["USR_LASTNAME"] = $lastName;
|
||||||
$arrayData["USR_EMAIL"] = $email;
|
$arrayData["USR_EMAIL"] = $email;
|
||||||
@@ -1380,7 +1380,7 @@ class wsBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (! empty( $password )) {
|
if (! empty( $password )) {
|
||||||
$arrayData["USR_PASSWORD"] = Bootstrap::hasPassword( $password );
|
$arrayData["USR_PASSWORD"] = Bootstrap::hashPassword( $password );
|
||||||
}
|
}
|
||||||
|
|
||||||
//Update user
|
//Update user
|
||||||
|
|||||||
@@ -379,7 +379,7 @@ class Main extends Controller
|
|||||||
$newPass = G::generate_password();
|
$newPass = G::generate_password();
|
||||||
|
|
||||||
$aData['USR_UID'] = $userData['USR_UID'];
|
$aData['USR_UID'] = $userData['USR_UID'];
|
||||||
$aData['USR_PASSWORD'] = Bootstrap::hasPassword( $newPass );
|
$aData['USR_PASSWORD'] = Bootstrap::hashPassword( $newPass );
|
||||||
|
|
||||||
$rbacUser->update( $aData );
|
$rbacUser->update( $aData );
|
||||||
$user->update( $aData );
|
$user->update( $aData );
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ if ($userData['USR_EMAIL'] != '' && $userData['USR_EMAIL'] === $data['USR_EMAIL'
|
|||||||
$newPass = G::generate_password();
|
$newPass = G::generate_password();
|
||||||
|
|
||||||
$aData['USR_UID'] = $userData['USR_UID'];
|
$aData['USR_UID'] = $userData['USR_UID'];
|
||||||
$aData['USR_PASSWORD'] = Bootstrap::hasPassword($newPass);
|
$aData['USR_PASSWORD'] = Bootstrap::hashPassword($newPass);
|
||||||
/* **Save after sending the mail
|
/* **Save after sending the mail
|
||||||
$rbacUser->update($aData);
|
$rbacUser->update($aData);
|
||||||
$user->update($aData);
|
$user->update($aData);
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ try {
|
|||||||
$_POST['form']['USR_NEW_PASS'] = '';
|
$_POST['form']['USR_NEW_PASS'] = '';
|
||||||
}
|
}
|
||||||
if ($_POST['form']['USR_NEW_PASS'] != '') {
|
if ($_POST['form']['USR_NEW_PASS'] != '') {
|
||||||
$_POST['form']['USR_PASSWORD'] = Bootstrap::hasPassword( $_POST['form']['USR_NEW_PASS'] );
|
$_POST['form']['USR_PASSWORD'] = Bootstrap::hashPassword( $_POST['form']['USR_NEW_PASS'] );
|
||||||
}
|
}
|
||||||
if (! isset( $_POST['form']['USR_CITY'] )) {
|
if (! isset( $_POST['form']['USR_CITY'] )) {
|
||||||
$_POST['form']['USR_CITY'] = '';
|
$_POST['form']['USR_CITY'] = '';
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ switch ($_POST['action']) {
|
|||||||
$form['USR_NEW_PASS'] = '';
|
$form['USR_NEW_PASS'] = '';
|
||||||
}
|
}
|
||||||
if ($form['USR_NEW_PASS'] != '') {
|
if ($form['USR_NEW_PASS'] != '') {
|
||||||
$form['USR_PASSWORD'] = Bootstrap::hasPassword($form['USR_NEW_PASS']);
|
$form['USR_PASSWORD'] = Bootstrap::hashPassword($form['USR_NEW_PASS']);
|
||||||
}
|
}
|
||||||
if (!isset($form['USR_CITY'])) {
|
if (!isset($form['USR_CITY'])) {
|
||||||
$form['USR_CITY'] = '';
|
$form['USR_CITY'] = '';
|
||||||
@@ -214,7 +214,7 @@ switch ($_POST['action']) {
|
|||||||
*/
|
*/
|
||||||
require_once 'classes/model/UsersProperties.php';
|
require_once 'classes/model/UsersProperties.php';
|
||||||
$oUserProperty = new UsersProperties();
|
$oUserProperty = new UsersProperties();
|
||||||
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($aData['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array(Bootstrap::hasPassword($aData['USR_PASSWORD'])))));
|
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($aData['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array(Bootstrap::hashPassword($aData['USR_PASSWORD'])))));
|
||||||
$aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME'];
|
$aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME'];
|
||||||
$oUserProperty->update($aUserProperty);
|
$oUserProperty->update($aUserProperty);
|
||||||
} else {
|
} else {
|
||||||
@@ -228,7 +228,7 @@ switch ($_POST['action']) {
|
|||||||
$aData['USR_PASSWORD'] = $form['USR_PASSWORD'];
|
$aData['USR_PASSWORD'] = $form['USR_PASSWORD'];
|
||||||
require_once 'classes/model/UsersProperties.php';
|
require_once 'classes/model/UsersProperties.php';
|
||||||
$oUserProperty = new UsersProperties();
|
$oUserProperty = new UsersProperties();
|
||||||
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($form['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array(md5($form['USR_PASSWORD'])))));
|
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($form['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array(Bootstrap::hashPassword($form['USR_PASSWORD'])))));
|
||||||
|
|
||||||
$memKey = 'rbacSession' . session_id();
|
$memKey = 'rbacSession' . session_id();
|
||||||
$memcache = & PMmemcached::getSingleton(defined('SYS_SYS') ? SYS_SYS : '' );
|
$memcache = & PMmemcached::getSingleton(defined('SYS_SYS') ? SYS_SYS : '' );
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ try {
|
|||||||
$form['USR_NEW_PASS'] = '';
|
$form['USR_NEW_PASS'] = '';
|
||||||
}
|
}
|
||||||
if ($form['USR_NEW_PASS'] != '') {
|
if ($form['USR_NEW_PASS'] != '') {
|
||||||
$form['USR_PASSWORD'] = Bootstrap::hasPassword( $form['USR_NEW_PASS'] );
|
$form['USR_PASSWORD'] = Bootstrap::hashPassword( $form['USR_NEW_PASS'] );
|
||||||
}
|
}
|
||||||
if (! isset( $form['USR_CITY'] )) {
|
if (! isset( $form['USR_CITY'] )) {
|
||||||
$form['USR_CITY'] = '';
|
$form['USR_CITY'] = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user