original_string: public function remove_user_from_group($user, $groupid) {
          global $DB;
          require_capability('moodle/course:managegroups', $this->context);
          $group = $this->get_group($groupid);
          if (!groups_remove_member_allowed($group, $user)) {
              return false;
          }
          if (!$group) {
              return false;
          }
          return groups_remove_member($group, $user);
      }
code: public function remove_user_from_group($user, $groupid) {
          global $DB;
          require_capability('moodle/course:managegroups', $this->context);
          $group = $this->get_group($groupid);
          if (!groups_remove_member_allowed($group, $user)) {
              return false;
          }
          if (!$group) {
              return false;
          }
          return groups_remove_member($group, $user);
      }
code_tokens: public function remove_user_from_group ( $ user , $ groupid ) { global $ DB ; require_capability ( 'moodle/course:managegroups' , $ this -> context ) ; $ group = $ this -> get_group ( $ groupid ) ; if ( ! groups_remove_member_allowed ( $ group , $ user ) ) { return false ; } if ( ! $ group ) { return false ; } return groups_remove_member ( $ group , $ user ) ; }
docstring: Removes a user from a group
  
  @global moodle_database $DB
  @param StdClass $user
  @param int $groupid
  @return bool
docstring_tokens: Removes a user from a group