Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions OAuthManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ protected function processUserData($userdata, $servicename)
$localUserInfo['grps'],
$userdata['grps'] ?? [],
array_keys($helper->listServices(false)),
$auth->getConf('overwrite-groups')
$auth->getOption('overwrite-groups')
);

// update user if changed
Expand All @@ -262,7 +262,7 @@ protected function processUserData($userdata, $servicename)
if ($localUserInfo != $userdata && !isset($localUserInfo['protected'])) {
$auth->modifyUser($localUser, $userdata);
}
} elseif (actionOK('register') || $auth->getConf('register-on-auth')) {
} elseif (actionOK('register') || $auth->getOption('register-on-auth')) {
if (!$auth->registerOAuthUser($userdata, $servicename)) {
throw new Exception('generic create error');
}
Expand Down
3 changes: 2 additions & 1 deletion action/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public function __construct()
public function register(EventHandler $controller)
{
global $conf;
if ($conf['authtype'] != 'oauth') return;
if (! (($conf['authtype'] == 'oauth')
or ($conf['authtype'] == 'authsplit' and $conf['plugin']['authsplit']['primary_authplugin'] == 'oauth'))) return;

$conf['profileconfirm'] = false; // password confirmation doesn't work with oauth only users

Expand Down
12 changes: 12 additions & 0 deletions auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,18 @@ public function getLang($id)
return $parent->getLang($id);
}

/**
* Get an option
*
* @param string $option The name of the wanted option
*
* @return string The option value
*/
public function getOption($option)
{
return $this->getConf($option);
}

/**
* Farmer plugin support
*
Expand Down