Lines Matching refs:group

64             ['select-user', 'select-user-groups', 'select-groups', 'insert-user', 'insert-group', 'join-group']
69 ['select-user', 'select-user-groups', 'select-groups', 'leave-group', 'delete-user']
94 ['select-user', 'select-user-groups', 'select-groups', 'leave-group', 'join-group', 'insert-group']
184 * The new user HAS TO be added to the default group by this
223 foreach ($grps as $group) {
224 if (!isset($allgroups[$group])) {
225 $ok = $this->addGroup($group);
232 foreach ($grps as $group) {
233 $ok = $this->joinGroup($userdata, $allgroups[$group]);
299 foreach ($oldgroups as $group) {
300 if (!in_array($group, $changes['grps']) && isset($allgroups[$group])) {
301 $ok = $this->leaveGroup($olddata, $allgroups[$group]);
308 foreach ($changes['grps'] as $group) {
309 if (!isset($allgroups[$group])) {
310 $ok = $this->addGroup($group);
315 // reload group info
319 foreach ($changes['grps'] as $group) {
320 if (!in_array($group, $oldgroups)) {
321 $ok = $this->joinGroup($olddata, $allgroups[$group]);
371 if (isset($filter['grps'])) $filter['group'] = $filter['grps'];
372 foreach (['user', 'name', 'mail', 'group'] as $key) {
410 if (isset($filter['grps'])) $filter['group'] = $filter['grps'];
411 foreach (['user', 'name', 'mail', 'group'] as $key) {
427 * Create a new group with the given name
429 * @param string $group
432 public function addGroup($group)
434 $sql = $this->getConf('insert-group');
436 $result = $this->query($sql, [':group' => $group]);
506 * Delete a user after removing all their group memberships
519 // remove group memberships (ignore errors)
520 foreach ($userdata['grps'] as $group) {
521 if (isset($allgroups[$group])) {
522 $this->leaveGroup($userdata, $allgroups[$group]);
541 * @return array|bool list of group names, false on error
553 if (!isset($row['group'])) {
554 $this->debugMsg("No 'group' field returned in select-user-groups statement", -1, __LINE__);
557 $groups[] = $row['group'];
584 if (!isset($row['group'])) {
585 $this->debugMsg("No 'group' field returned from select-groups statement", -1, __LINE__);
589 // relayout result with group name as key
590 $group = $row['group'];
591 $groups[$group] = $row;
602 * Remove all entries from the group cache
610 * Adds the user to the group
613 * @param array $groupdata all the group data
619 $sql = $this->getConf('join-group');
626 * Removes the user from the group
629 * @param array $groupdata all the group data
635 $sql = $this->getConf('leave-group');