Merge branch '0.9.x' into openidplugin

This commit is contained in:
Evan Prodromou 2009-08-04 13:10:43 -04:00
commit 000e21be19
2 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -77,11 +77,13 @@ class SettingsAction extends CurrentUserDesignAction
// _all_ our settings are important
common_set_returnto($this->selfUrl());
$user = common_current_user();
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();
} else {