We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 8f122dd7 authored by Evan Prodromou's avatar Evan Prodromou

new action for when we redirect to login page

parent 9421b364
......@@ -223,3 +223,7 @@ EndRegistrationTry: after saving a new user (note: no profile or user object!)
StartNewQueueManager: before trying to start a new queue manager; good for plugins implementing new queue manager classes
- $qm: empty queue manager to set
RedirectToLogin: event when we force a redirect to login (like when going to a settings page on a remembered login)
- $action: action object being shown
- $user: current user
......@@ -77,10 +77,12 @@ class SettingsAction extends CurrentUserDesignAction
// _all_ our settings are important
common_set_returnto($this->selfUrl());
$user = common_current_user();
if ($user->hasOpenID()) {
common_redirect(common_local_url('openidlogin'), 303);
} else {
common_redirect(common_local_url('login'), 303);
if (Event::handle('RedirectToLogin', array($this, $user))) {
if ($user->hasOpenID()) {
common_redirect(common_local_url('openidlogin'), 303);
} else {
common_redirect(common_local_url('login'), 303);
}
}
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->handlePost();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment