X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsettingsaction.php;h=a1f305f5b74e076cdda6256b8bb04a6e1d1cbdae;hb=b76aa87f49135a416de91d73405c4f4e34f72bbb;hp=dfe1f114b21e1b73dc10b36692a1b144e4db27e8;hpb=12c475c101c070cbcc4c63f7b1049f6d3282b9ee;p=quix0rs-gnu-social.git diff --git a/lib/settingsaction.php b/lib/settingsaction.php index dfe1f114b2..a1f305f5b7 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. @@ -76,7 +76,12 @@ class SettingsAction extends Action // change important settings or see private info, and // _all_ our settings are important common_set_returnto($this->selfUrl()); - common_redirect(common_local_url('login')); + $user = common_current_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 {