src/HipChat/HipChat.php
public function create_user($email, $name, $mention_name = null,
                              $title = null, $is_group_admin = 0,
                              $password = null, $timezone = null) {
    $args = array(
      'email' => $email,
      'name'  => $name,
    );

    if ($mention_name) {
      $args['mention_name'] = $mention_name;
    }

    if ($title) {
      $args['title'] = $title;
    }

    if ($is_group_admin) {
      $args['is_group_admin'] = (int)$is_group_admin;
    }

    if ($password) {
      $args['password'] = $password;
    }

    // @see http://api.hipchat.com/docs/api/timezones
    if ($timezone) {
      $args['timezone'] = $timezone;
    }

    // Return the std object
    return $this->make_request('users/create', $args, 'POST');
  }
public function create_user($email, $name, $mention_name = null,
                              $title = null, $is_group_admin = 0,
                              $password = null, $timezone = null) {
    $args = array(
      'email' => $email,
      'name'  => $name,
    );

    if ($mention_name) {
      $args['mention_name'] = $mention_name;
    }

    if ($title) {
      $args['title'] = $title;
    }

    if ($is_group_admin) {
      $args['is_group_admin'] = (int)$is_group_admin;
    }

    if ($password) {
      $args['password'] = $password;
    }

    // @see http://api.hipchat.com/docs/api/timezones
    if ($timezone) {
      $args['timezone'] = $timezone;
    }

    // Return the std object
    return $this->make_request('users/create', $args, 'POST');
  }
public function create_user ( $ email , $ name , $ mention_name = null , $ title = null , $ is_group_admin = 0 , $ password = null , $ timezone = null ) { $ args = array ( 'email' => $ email , 'name' => $ name , ) ; if ( $ mention_name ) { $ args [ 'mention_name' ] = $ mention_name ; } if ( $ title ) { $ args [ 'title' ] = $ title ; } if ( $ is_group_admin ) { $ args [ 'is_group_admin' ] = ( int ) $ is_group_admin ; } if ( $ password ) { $ args [ 'password' ] = $ password ; } // @see http://api.hipchat.com/docs/api/timezones if ( $ timezone ) { $ args [ 'timezone' ] = $ timezone ; } // Return the std object return $ this -> make_request ( 'users/create' , $ args , 'POST' ) ; }
Create a new user in your group.

@see http://api.hipchat.com/docs/api/method/users/create
Create a new user in your group .