method groups documentation in bbn\User\Manager

Returns all the users' groups - with or without admin

function() { $a =& $this->class_cfg['arch']; $t =& $this->class_cfg['tables']; $id = $this->db->cfn($a['groups']['id'], $t['groups']); $users_id = $this->db->cfn($a['users']['id'], $t['users'], 1); $db =& $this->db; $fields = \array_map( function ($g) use ($db, $t) { return $db->cfn($g, $t['groups']); }, \array_values($a['groups']) ); $fields['num'] = "COUNT($users_id)"; return $this->db->rselectAll( [ 'table' => $t['groups'], 'fields' => $fields, 'join' => [[ 'table' => $t['users'], 'type' => 'left', 'on' => [ 'conditions' => [[ 'field' => $this->db->cfn($a['users']['id_group'], $t['users']), 'exp' => $id ]] ] ]], 'group_by' => [$id] ] ); }

Returns all the users' groups - with or without admin BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.