Lines Matching defs:auth

13  *  objectified version of auth system
27 protected $auth; // auth object
44 /** @var AuthPlugin $auth */
45 global $auth;
49 if (!$auth instanceof AuthPlugin) {
51 } elseif (!$auth->canDo('getUsers')) {
55 $this->auth = &$auth;
73 if (!is_null($this->auth))
121 if (is_null($this->auth)) return false;
168 $this->users_total = $this->auth->canDo('getUserCount') ? $this->auth->getUserCount($this->filter) : -1;
199 if (is_null($this->auth)) {
204 $user_list = $this->auth->retrieveUsers($this->start, $this->pagesize, $this->filter);
207 $delete_disable = $this->auth->canDo('delUser') ? '' : 'disabled="disabled"';
209 $editable = $this->auth->canDo('UserMod');
224 $this->auth->getUserCount()
230 $allUserTotal = $this->auth->getUserCount();
322 if ($this->auth->canDo('addUser')) {
333 if ($this->edit_user && $this->auth->canDo('UserMod')) {
344 if ($this->auth->canDo('addUser')) {
352 * User Manager is only available if the auth backend supports it
359 /** @var AuthPlugin $auth */
360 global $auth;
361 if (!$auth instanceof AuthPlugin || !$auth->canDo('getUsers')) {
409 $this->auth->canDo("modLogin"),
418 $this->auth->canDo("modPass"),
427 $this->auth->canDo("modPass"),
436 $this->auth->canDo("modName"),
445 $this->auth->canDo("modMail"),
454 $this->auth->canDo("modGroups"),
459 if ($this->auth->canDo("modPass")) {
511 * @param bool $cando whether auth backend is capable to do this action
636 * Add an user to auth backend
644 if (!$this->auth->canDo('addUser')) return false;
649 if ($this->auth->canDo('modPass')) {
669 if ($this->auth->canDo('modName')) {
681 if ($this->auth->canDo('modMail')) {
693 if ($ok = $this->auth->triggerUserMod('create', [$user, $pass, $name, $mail, $grps])) {
708 * Delete user from auth backend
717 if (!$this->auth->canDo('delUser')) return false;
728 $count = $this->auth->triggerUserMod('delete', [$selected]);
753 if (!$this->auth->canDo('UserMod')) return false;
754 $user = $this->auth->cleanUser(preg_replace('/.*[:\/]/', '', $param));
755 $userdata = $this->auth->getUserData($user);
770 * Modify user in the auth backend (modified user data has been recieved)
779 if (!$this->auth->canDo('UserMod')) return false;
782 $olduser = $this->auth->cleanUser(preg_replace('/.*[:\/]/', '', $INPUT->str('userid_old')));
783 $oldinfo = $this->auth->getUserData($olduser);
791 if (!$this->auth->canDo('modLogin')) { // sanity check, shouldn't be possible
797 if ($this->auth->getUserData($newuser)) {
804 if ($this->auth->canDo('modPass')) {
817 if (!empty($newname) && $this->auth->canDo('modName') && $newname != $oldinfo['name']) {
820 if (!empty($newmail) && $this->auth->canDo('modMail') && $newmail != $oldinfo['mail']) {
823 if (!empty($newgrps) && $this->auth->canDo('modGroups') && $newgrps != $oldinfo['grps']) {
827 if ($ok = $this->auth->triggerUserMod('modify', [$olduser, $changes])) {
905 /** @var AuthPlugin $auth */
906 global $auth;
910 $user[0] = ($clean) ? $auth->cleanUser($INPUT->str('userid')) : $INPUT->str('userid');
919 $user[4] = array_map([$auth, 'cleanGroup'], $user[4]);
1020 $user_list = $this->auth->retrieveUsers(0, 0, $this->filter);
1062 if (!$this->auth->canDo('addUser')) return false;
1160 if (!($this->auth->canDo('modName') xor empty($name))) {
1165 if ($this->auth->canDo('modMail')) {
1179 * Adds imported user to auth backend
1189 if (!$this->auth->triggerUserMod('create', $user)) {