/** * accountAction * Manage the User account settings. * @return void */ public function accountAction() { $form = $this->getForm('/admin/profile/process'); $this->view->form = $form; $this->view->mex = $this->getRequest()->getParam('mex'); $this->view->mexstatus = $this->getRequest()->getParam('status'); $this->view->title = $this->translator->translate("User Account"); $this->view->description = $this->translator->translate("Here you can edit your user account information"); $adminbuttons = array(); // Create the buttons in the edit form if (AdminRoles::isAdministrator($this->logged_user['user_id'])) { $this->view->buttons = array(array("url" => "#", "label" => $this->translator->translate('Save'), "params" => array('css' => null, 'id' => 'submit')), array("url" => "/admin/profile/list", "label" => $this->translator->translate('List'), "params" => array('css' => null, 'id' => 'submit'))); } else { $this->view->buttons = array(array("url" => "#", "label" => $this->translator->translate('Save'), "params" => array('css' => null, 'id' => 'submit'))); } $user = AdminUser::getAllInfo($this->logged_user['user_id']); $user['permissions'] = AdminRoles::getResourcesbyUserID($this->logged_user['user_id']); // the password is a MD5 string so we need to empty it, because the software could save the MD5 value again. $user['password'] = ""; $form->populate($user); $this->render('applicantform'); }