protected function editPassword() { global $login; // sprawdza czy uzytkownik nie zmienil sb id podczas edycji if (ClassTools::getValue('id_user') != $login->auth_user['id_user']) { $this->alerts['danger'] = 'Niepoprawny użytkownik'; return false; } $item = new ClassUser(ClassTools::getValue('id_user')); $item->id_user = ClassAuth::getCurrentUserId(); // komunikaty bledu if (!$item->myAccountEditPassword(ClassTools::getValue('form_new_password'), ClassTools::getValue('form_new_password_repeat'))) { $this->alerts['danger'] = $item->errors; return; } // komunikat sukcesu $this->alerts['success'] = "Poprawnie zmieniono hasło."; // czyszczeie zmiennych wyswietlania $this->tpl_values = ''; $_POST = array(); return; }