Esempio n. 1
0
 protected function process_data(&$signal)
 {
     $result = parent::process_data($signal);
     $params = $this->get_task_params();
     $params['user'] = $signal->data_user($this->default_data_key);
     if (is_null($params['user'])) {
         return false;
     }
     require_once dirname(__FILE__) . '/../../../../core/tasks//userrights.php';
     $task = new Task_Userrights($this->core);
     $result = $task->go($params);
     $this->set_jobdata($result, array('user' => $params['user']));
     return $result;
 }
Esempio n. 2
0
 public function userrights($user, $reason, $add_groups = NULL, $remove_groups = NULL)
 {
     $params = array('user' => $user, 'reason' => $reason, 'add' => $add_groups, 'remove' => $remove_groups);
     require_once dirname(__FILE__) . '/../../core/tasks/userrights.php';
     $task = new Task_Userrights($this->core);
     return $task->go($params);
 }