protected function changepassword() { global $rep, $view; $data = array(); if (isset($_POST['changepassword'])) { //we edit if ($_POST['pwd1'] != '') { //we edit $usr = $_SESSION['username']; $pwd1 = $_POST['pwd1']; $pwd2 = $_POST['pwd2']; if (checkData::checkBothPassword($pwd1, $pwd2)) { ///other verification including regexp etc... userModel::changepassUser($usr, $pwd1); $data['password'] = '******'; } else { $data['password'] = '******'t match!'; } } else { $data['password'] = '******'; } } require_once $view['manageaccount']; }