X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsettingsaction.php;h=c3669868d4d3cb177401e1f1747b7f7c06cf6c0d;hb=d88b208edcb75ec864e09bb3ab29785b35064400;hp=53c807c6f9cc834aaa6955d6107e8e11a5811742;hpb=383e6c730db5808b961f53bf39868053fca1fc32;p=quix0rs-gnu-social.git diff --git a/lib/settingsaction.php b/lib/settingsaction.php index 53c807c6f9..c3669868d4 100644 --- a/lib/settingsaction.php +++ b/lib/settingsaction.php @@ -1,6 +1,6 @@ . * * @category Settings - * @package Laconica - * @author Evan Prodromou - * @copyright 2008-2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @copyright 2008-2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -35,15 +35,15 @@ if (!defined('LACONICA')) { * Base class for settings group of actions * * @category Settings - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ * * @see Widget */ -class SettingsAction extends Action +class SettingsAction extends CurrentUserDesignAction { /** * A message for the user. @@ -77,10 +77,8 @@ class SettingsAction extends Action // _all_ our settings are important common_set_returnto($this->selfUrl()); $user = common_current_user(); - if ($user->hasOpenID()) { - common_redirect(common_local_url('openidlogin')); - } else { - common_redirect(common_local_url('login')); + if (Event::handle('RedirectToLogin', array($this, $user))) { + common_redirect(common_local_url('login'), 303); } } else if ($_SERVER['REQUEST_METHOD'] == 'POST') { $this->handlePost();