コード例 #1
0
 function action()
 {
     $userManager = owa_coreApi::supportClassFactory('base', 'userManager');
     // add check here to ensure that this is not the default user....
     $userManager->deleteUser($this->getParam('user_id'));
     $this->setRedirectAction('base.users');
     $this->set('status_code', 3004);
 }
コード例 #2
0
 function action()
 {
     $userManager = owa_coreApi::supportClassFactory('base', 'userManager');
     $user_params = array('user_id' => trim($this->params['user_id']), 'real_name' => $this->params['real_name'], 'role' => $this->params['role'], 'email_address' => trim($this->params['email_address']));
     $temp_passkey = $userManager->createNewUser($user_params);
     // log account creation event to event queue
     $ed = owa_coreAPI::getEventDispatch();
     $ed->log(array('user_id' => $this->params['user_id'], 'real_name' => $this->params['real_name'], 'role' => $this->params['role'], 'email_address' => $this->params['email_address'], 'temp_passkey' => $temp_passkey), 'base.new_user_account');
     $this->setRedirectAction('base.users');
     $this->set('status_code', 3000);
 }