Lines Matching defs:auth

14  *  objectified version of auth system
28 protected $auth; // auth object
45 /** @var AuthPlugin $auth */
46 global $auth;
50 if (!$auth instanceof AuthPlugin) {
52 } elseif (!$auth->canDo('getUsers')) {
56 $this->auth = &$auth;
74 if (!is_null($this->auth))
122 if (is_null($this->auth)) return false;
169 $this->users_total = $this->auth->canDo('getUserCount') ? $this->auth->getUserCount($this->filter) : -1;
200 if (is_null($this->auth)) {
205 $user_list = $this->auth->retrieveUsers($this->start, $this->pagesize, $this->filter);
208 $delete_disable = $this->auth->canDo('delUser') ? '' : 'disabled="disabled"';
210 $editable = $this->auth->canDo('UserMod');
225 $this->auth->getUserCount()
231 $allUserTotal = $this->auth->getUserCount();
323 if ($this->auth->canDo('addUser')) {
334 if ($this->edit_user && $this->auth->canDo('UserMod')) {
345 if ($this->auth->canDo('addUser')) {
353 * User Manager is only available if the auth backend supports it
360 /** @var AuthPlugin $auth */
361 global $auth;
362 if (!$auth instanceof AuthPlugin || !$auth->canDo('getUsers')) {
410 $this->auth->canDo("modLogin"),
419 $this->auth->canDo("modPass"),
428 $this->auth->canDo("modPass"),
437 $this->auth->canDo("modName"),
446 $this->auth->canDo("modMail"),
455 $this->auth->canDo("modGroups"),
460 if ($this->auth->canDo("modPass")) {
512 * @param bool $cando whether auth backend is capable to do this action
637 * Add an user to auth backend
645 if (!$this->auth->canDo('addUser')) return false;
650 if ($this->auth->canDo('modPass')) {
670 if ($this->auth->canDo('modName')) {
682 if ($this->auth->canDo('modMail')) {
694 if ($ok = $this->auth->triggerUserMod('create', [$user, $pass, $name, $mail, $grps])) {
709 * Delete user from auth backend
718 if (!$this->auth->canDo('delUser')) return false;
729 $count = $this->auth->triggerUserMod('delete', [$selected]);
754 if (!$this->auth->canDo('UserMod')) return false;
755 $user = $this->auth->cleanUser(preg_replace('/.*[:\/]/', '', $param));
756 $userdata = $this->auth->getUserData($user);
771 * Modify user in the auth backend (modified user data has been recieved)
780 if (!$this->auth->canDo('UserMod')) return false;
783 $olduser = $this->auth->cleanUser(preg_replace('/.*[:\/]/', '', $INPUT->str('userid_old')));
784 $oldinfo = $this->auth->getUserData($olduser);
792 if (!$this->auth->canDo('modLogin')) { // sanity check, shouldn't be possible
798 if ($this->auth->getUserData($newuser)) {
805 if ($this->auth->canDo('modPass')) {
818 if (!empty($newname) && $this->auth->canDo('modName') && $newname != $oldinfo['name']) {
821 if (!empty($newmail) && $this->auth->canDo('modMail') && $newmail != $oldinfo['mail']) {
824 if (!empty($newgrps) && $this->auth->canDo('modGroups') && $newgrps != $oldinfo['grps']) {
828 if ($ok = $this->auth->triggerUserMod('modify', [$olduser, $changes])) {
906 /** @var AuthPlugin $auth */
907 global $auth;
911 $user[0] = ($clean) ? $auth->cleanUser($INPUT->str('userid')) : $INPUT->str('userid');
920 $user[4] = array_map([$auth, 'cleanGroup'], $user[4]);
1021 $user_list = $this->auth->retrieveUsers(0, 0, $this->filter);
1063 if (!$this->auth->canDo('addUser')) return false;
1161 if (!($this->auth->canDo('modName') xor empty($name))) {
1166 if ($this->auth->canDo('modMail')) {
1180 * Adds imported user to auth backend
1190 if (!$this->auth->triggerUserMod('create', $user)) {