escape($userMethods->HashPassword($_POST['a_password'], $currentUser['user_loginname']), FALSE); unset($_POST['a_password']); unset($_POST['a_password2']); if (vartrue($pref['allowEmailLogin'])) { $new_pass = e107::getParser()->filter($_POST['a_password']); $user_prefs = e107::getArrayStorage()->unserialize($currentUser['user_prefs']); $user_prefs['email_password'] = $userMethods->HashPassword($new_pass, USEREMAIL); $userData['data']['user_prefs'] = e107::getArrayStorage()->serialize($user_prefs); } $userData['data']['user_pwchange'] = time(); $userData['WHERE'] = 'user_id='.USERID; validatorClass::addFieldTypes($userMethods->userVettingInfo,$userData, $userMethods->otherFieldTypes); $check = $sql->update('user',$userData); if ($check) { e107::getLog()->add('ADMINPW_01', ''); $userMethods->makeUserCookie(array('user_id' => USERID,'user_password' => $userData['data']['user_password']), FALSE); // Can't handle autologin ATM $mes->addSuccess(UDALAN_3." ".ADMINNAME); e107::getEvent()->trigger('adpword'); //@deprecated $eventData = array('user_id'=> USERID, 'user_pwchange'=> $userData['data']['user_pwchange']); e107::getEvent()->trigger('admin_password_update',$eventData ); $ns->tablerender(UDALAN_2, $mes->render()); } else { $mes->addError(UDALAN_1.' '.LAN_UPDATED_FAILED); $ns->tablerender(LAN_UPDATED_FAILED, $mes->render()); } } else { $mes->addError(UDALAN_1.' '.LAN_UPDATED_FAILED); $ns->tablerender(LAN_UPDATED_FAILED, $mes->render()); } } } else { $text = "
"; $ns->tablerender(UDALAN_8." ".ADMINNAME, $text); } require_once(e_ADMIN.'footer.php');