Fixed the bug related with the need to enter passwords when you change the profile of any operator.

This commit is contained in:
Dmitriy Simushev 2012-01-18 10:11:49 +00:00
parent 450e970ed8
commit 169680eda7
2 changed files with 1 additions and 7 deletions

View File

@ -121,12 +121,6 @@ function update_operator($operatorid, $login, $email, $password, $localename, $c
perform_query($query, $link);
close_connection($link);
// update the session password
if (isset($password))
{
$_SESSION[$mysqlprefix.'operator']['vcpassword']=md5($password);
}
}
function update_operator_avatar($operatorid, $avatar)

View File

@ -78,7 +78,7 @@ if (isset($_POST['login']) && isset($_POST['password'])) {
} else {
update_operator($opId, $login, $email, $password, $localname, $commonname);
// update the session password
if (isset($password) && $opId == $operator['operatorid']) {
if (!empty($password) && $opId == $operator['operatorid']) {
$toDashboard = $operator['vcpassword'] == md5('') && $password != '';
$_SESSION["${mysqlprefix}operator"]['vcpassword'] = md5($password);
if($toDashboard) {