X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FCasAuthentication%2Fcaslogin.php;h=a66774dc17e911caf71d08069d648c0485020817;hb=efa7dcc66dd8add017d9ca3fb8eacde5cd929fef;hp=390a75d8b417261b8cdaf280913947b64174a8e9;hpb=90a2563a90e1bf2239d177a564bbe3e838d93dc4;p=quix0rs-gnu-social.git diff --git a/plugins/CasAuthentication/caslogin.php b/plugins/CasAuthentication/caslogin.php index 390a75d8b4..a66774dc17 100644 --- a/plugins/CasAuthentication/caslogin.php +++ b/plugins/CasAuthentication/caslogin.php @@ -54,9 +54,18 @@ class CasloginAction extends Action // We don't have to return to it again common_set_returnto(null); } else { - $url = common_local_url('all', - array('nickname' => - $user->nickname)); + if(common_config('site', 'private') && $casSettings['takeOverLogin']) { + //SSO users expect to just go to the URL they entered + //if we don't have a returnto set, the user entered the + //main StatusNet url, so send them there. + $url = common_local_url('public'); + } else { + //With normal logins (regular form-based username/password), + //the user would expect to go to their home after logging in. + $url = common_local_url('public', + array('nickname' => + $user->nickname)); + } } common_redirect($url, 303);