aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/Extension/AuthPlugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/Extension/AuthPlugin.php')
-rw-r--r--inc/Extension/AuthPlugin.php22
1 files changed, 10 insertions, 12 deletions
diff --git a/inc/Extension/AuthPlugin.php b/inc/Extension/AuthPlugin.php
index 4b75fba95..4e889f90c 100644
--- a/inc/Extension/AuthPlugin.php
+++ b/inc/Extension/AuthPlugin.php
@@ -20,7 +20,7 @@ abstract class AuthPlugin extends Plugin
* do. The things a backend can do need to be set to true
* in the constructor.
*/
- protected $cando = array(
+ protected $cando = [
'addUser' => false, // can Users be created?
'delUser' => false, // can Users be deleted?
'modLogin' => false, // can login names be changed?
@@ -33,7 +33,7 @@ abstract class AuthPlugin extends Plugin
'getGroups' => false, // can a list of available groups be retrieved?
'external' => false, // does the module do external auth checking?
'logout' => true, // can the user logout again? (eg. not possible with HTTP auth)
- );
+ ];
/**
* Constructor.
@@ -90,7 +90,6 @@ abstract class AuthPlugin extends Plugin
return ($this->cando['modPass'] ||
$this->cando['modName'] ||
$this->cando['modMail']);
- break;
case 'UserMod':
// can at least anything be changed?
return ($this->cando['modPass'] ||
@@ -99,7 +98,6 @@ abstract class AuthPlugin extends Plugin
$this->cando['modLogin'] ||
$this->cando['modGroups'] ||
$this->cando['modMail']);
- break;
default:
// print a helping message for developers
if (!isset($this->cando[$cap])) {
@@ -124,20 +122,20 @@ abstract class AuthPlugin extends Plugin
*/
public function triggerUserMod($type, $params)
{
- $validTypes = array(
+ $validTypes = [
'create' => 'createUser',
'modify' => 'modifyUser',
- 'delete' => 'deleteUsers',
- );
+ 'delete' => 'deleteUsers'
+ ];
if (empty($validTypes[$type])) {
return false;
}
$result = false;
- $eventdata = array('type' => $type, 'params' => $params, 'modification_result' => null);
+ $eventdata = ['type' => $type, 'params' => $params, 'modification_result' => null];
$evt = new Event('AUTH_USER_CHANGE', $eventdata);
if ($evt->advise_before(true)) {
- $result = call_user_func_array(array($this, $validTypes[$type]), $evt->data['params']);
+ $result = call_user_func_array([$this, $validTypes[$type]], $evt->data['params']);
$evt->data['modification_result'] = $result;
}
$evt->advise_after();
@@ -323,7 +321,7 @@ abstract class AuthPlugin extends Plugin
* @param array $filter array of field/pattern pairs, empty array for no filter
* @return int
*/
- public function getUserCount($filter = array())
+ public function getUserCount($filter = [])
{
msg("authorisation method does not provide user counts", -1);
return 0;
@@ -343,7 +341,7 @@ abstract class AuthPlugin extends Plugin
public function retrieveUsers($start = 0, $limit = 0, $filter = null)
{
msg("authorisation method does not support mass retrieval of user data", -1);
- return array();
+ return [];
}
/**
@@ -374,7 +372,7 @@ abstract class AuthPlugin extends Plugin
public function retrieveGroups($start = 0, $limit = 0)
{
msg("authorisation method does not support group list retrieval", -1);
- return array();
+ return [];
}
/**