forked from GNUsocial/gnu-social
Added configuration option to only allow OpenID logins.
If $config['site']['openidonly'] is set to true: * the Login/Register pages will be removed from the navigation; * directly accesses to the Login/Register pages will redirect to the OpenID login page; * most links to the Login/Register pages will link to the OpenID login page instead. The user will still need to set a password to access the API and RSS feeds.
This commit is contained in:
@@ -47,7 +47,11 @@ class UserauthorizationAction extends Action
|
||||
# Go log in, and then come back
|
||||
common_set_returnto($_SERVER['REQUEST_URI']);
|
||||
|
||||
common_redirect(common_local_url('login'));
|
||||
if (!common_config('site', 'openidonly')) {
|
||||
common_redirect(common_local_url('login'));
|
||||
} else {
|
||||
common_redirect(common_local_url('openidlogin'));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user