mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:47:02 +02:00
webui code cleanup
This commit is contained in:
@ -18,7 +18,7 @@ class ControllerUserAdd extends Controller {
|
||||
$this->load->model('user/user');
|
||||
$this->load->model('group/group');
|
||||
|
||||
$this->document->title = $this->data['text_user_management'];
|
||||
$this->document->title = $this->data['text_add_new_user_alias'];
|
||||
|
||||
$this->data['domains'] = array();
|
||||
|
||||
@ -37,7 +37,7 @@ class ControllerUserAdd extends Controller {
|
||||
$ret = 0;
|
||||
|
||||
if($this->validate() == true){
|
||||
$ret = $this->model_user_user->addUser($this->request->post);
|
||||
$ret = $this->model_user_user->add_user($this->request->post);
|
||||
|
||||
$_SESSION['last_domain'] = $this->request->post['domain'];
|
||||
|
||||
@ -54,12 +54,12 @@ class ControllerUserAdd extends Controller {
|
||||
if($ret == 0) {
|
||||
|
||||
$this->data['post'] = $this->request->post;
|
||||
$this->data['next_user_id'] = $this->model_user_user->getNextUid();
|
||||
$this->data['next_user_id'] = $this->model_user_user->get_next_uid();
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->data['next_user_id'] = $this->model_user_user->getNextUid();
|
||||
$this->data['next_user_id'] = $this->model_user_user->get_next_uid();
|
||||
$this->data['groups'] = $this->model_group_group->get_groups();
|
||||
}
|
||||
}
|
||||
@ -114,7 +114,7 @@ class ControllerUserAdd extends Controller {
|
||||
$this->error['username'] = $this->data['text_invalid_username'];
|
||||
}
|
||||
|
||||
if(isset($this->request->post['username']) && $this->model_user_user->getUidByName($this->request->post['username']) > 0) {
|
||||
if(isset($this->request->post['username']) && $this->model_user_user->get_uid_by_name($this->request->post['username']) > 0) {
|
||||
$this->error['username'] = $this->data['text_existing_user'];
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ class ControllerUserEdit extends Controller {
|
||||
$this->load->model('group/group');
|
||||
|
||||
|
||||
$this->document->title = $language->get('text_user_management');
|
||||
$this->document->title = $language->get('text_edit_user');
|
||||
|
||||
$this->data['domains'] = array();
|
||||
|
||||
@ -53,7 +53,7 @@ class ControllerUserEdit extends Controller {
|
||||
if($this->request->server['REQUEST_METHOD'] == 'POST') {
|
||||
if($this->validate() == true){
|
||||
|
||||
$ret = $this->model_user_user->updateUser($this->request->post);
|
||||
$ret = $this->model_user_user->update_user($this->request->post);
|
||||
|
||||
if($ret == 1){
|
||||
$this->data['x'] = $this->data['text_successfully_modified'];
|
||||
@ -75,7 +75,7 @@ class ControllerUserEdit extends Controller {
|
||||
|
||||
$this->data['user']['group_membership'] = $this->model_user_user->get_additional_uids($this->data['uid']);
|
||||
|
||||
$this->data['emails'] = $this->model_user_user->getEmails($this->data['user']['username']);
|
||||
$this->data['emails'] = $this->model_user_user->get_emails($this->data['user']['username']);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -59,10 +59,10 @@ class ControllerUserList extends Controller {
|
||||
|
||||
if(Registry::get('admin_user') == 1) {
|
||||
|
||||
$users = $this->model_user_user->getUsers($this->data['search'], $this->data['page'], $this->data['page_len'],
|
||||
$users = $this->model_user_user->get_users($this->data['search'], $this->data['page'], $this->data['page_len'],
|
||||
$this->data['sort'], $this->data['order']);
|
||||
|
||||
$this->data['total_users'] = $this->model_user_user->howManyUsers($this->data['search']);
|
||||
$this->data['total_users'] = $this->model_user_user->count_users($this->data['search']);
|
||||
|
||||
foreach ($users as $user) {
|
||||
$policy_group = DEFAULT_POLICY;
|
||||
|
@ -31,7 +31,7 @@ class ControllerUserRemove extends Controller {
|
||||
if($this->validate() == true) {
|
||||
|
||||
if($this->data['confirmed'] == 1) {
|
||||
$ret = $this->model_user_user->deleteUser($this->data['uid']);
|
||||
$ret = $this->model_user_user->delete_user($this->data['uid']);
|
||||
if($ret == 1){
|
||||
$this->data['x'] = $this->data['text_successfully_removed'];
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ class ControllerUserSettings extends Controller {
|
||||
|
||||
if($this->request->server['REQUEST_METHOD'] == 'POST' && PASSWORD_CHANGE_ENABLED == 1 && $this->validate() == true) {
|
||||
|
||||
if($this->model_user_auth->changePassword(Registry::get('username'), $this->request->post['password']) == 1) {
|
||||
if($this->model_user_auth->change_password(Registry::get('username'), $this->request->post['password']) == 1) {
|
||||
$this->data['x'] = $this->data['text_password_changed'];
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user