Exemplo n.º 1
0
 /**
  * Run the group tester
  * 
  * @return void
  */
 function run()
 {
     echo '<p>Use this form to see if a particular username will be part of this group</p>' . "\n";
     $tester = new Disco();
     $tester->init(true);
     $tester->add_element('username_to_check', 'text', array('display_name' => ' '));
     $tester->actions = array('test' => 'Test this username');
     $tester->run();
     if (!empty($this->admin_page->request['username_to_check'])) {
         $username = $this->admin_page->request['username_to_check'];
         $gh = new group_helper();
         $gh->set_group_by_entity($this->group);
         if ($gh->is_username_member_of_group($username)) {
             echo '<p><strong>Yes</strong>, ' . $username . ' is a member of this group.</p>' . "\n";
         } else {
             echo '<p><strong>No</strong>, ' . $username . ' is not a member of this group.</p>' . "\n";
         }
     }
     echo '<p><a href="' . $this->admin_page->make_link(array('cur_module' => 'Editor', 'mode' => '')) . '">Return to editing the group</a>';
 }
Exemplo n.º 2
0
 function init($externally_setup = true)
 {
     $this->step_init();
     parent::init($externally_setup);
 }
 function init($args = array())
 {
     $this->step_init();
     parent::init(true);
 }
Exemplo n.º 4
0
	/**
	 * Inits the Disco Form
	 */
	function init( $externally_set_up = false )
	{
		$this->_init();
		parent::init();
	}