aboutsummaryrefslogtreecommitdiffstats
path: root/include/auth.php
diff options
context:
space:
mode:
authorThomas <rat@rlyeh-military-affairs>2012-03-19 22:33:06 +0000
committerThomas <rat@rlyeh-military-affairs>2012-03-19 22:33:06 +0000
commit64a2b00cdc97e40ac8e9dc8f0b9cdc5d78cdf2c2 (patch)
tree10ee9998a00039e39e33b30786a76f0dae9a486d /include/auth.php
parent84f8e2eaa87c90473ce79ebcd4f76f3657258f27 (diff)
parenta156ce196ed7265cf9504aa39dabffa98cb54a45 (diff)
downloadvolse-hubzilla-64a2b00cdc97e40ac8e9dc8f0b9cdc5d78cdf2c2.tar.gz
volse-hubzilla-64a2b00cdc97e40ac8e9dc8f0b9cdc5d78cdf2c2.tar.bz2
volse-hubzilla-64a2b00cdc97e40ac8e9dc8f0b9cdc5d78cdf2c2.zip
Merge remote-tracking branch 'main/master'
Diffstat (limited to 'include/auth.php')
-rwxr-xr-xinclude/auth.php31
1 files changed, 5 insertions, 26 deletions
diff --git a/include/auth.php b/include/auth.php
index fc52684e6..4e246e354 100755
--- a/include/auth.php
+++ b/include/auth.php
@@ -24,7 +24,7 @@ if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && ((! (x($_POST,'auth-p
if(((x($_POST,'auth-params')) && ($_POST['auth-params'] === 'logout')) || ($a->module === 'logout')) {
// process logout request
-
+ call_hooks("logging_out");
nuke_session();
info( t('Logged out.') . EOL);
goaway(z_root());
@@ -77,7 +77,7 @@ else {
$noid = get_config('system','no_openid');
- $openid_url = trim( (strlen($_POST['openid_url'])?$_POST['openid_url']:$_POST['username']) );
+ $openid_url = trim((strlen($_POST['openid_url'])?$_POST['openid_url']:$_POST['username']) );
// validate_url alters the calling parameter
@@ -99,30 +99,9 @@ else {
$openid->identity = $openid_url;
$_SESSION['openid'] = $openid_url;
$a = get_app();
- $openid->returnUrl = $a->get_baseurl() . '/openid';
-
- $r = q("SELECT `uid` FROM `user` WHERE `openid` = '%s' LIMIT 1",
- dbesc($openid_url)
- );
- if(count($r)) {
- // existing account
- goaway($openid->authUrl());
- // NOTREACHED
- }
- else {
- if($a->config['register_policy'] == REGISTER_CLOSED) {
- $a = get_app();
- notice( t('Login failed.') . EOL);
- goaway(z_root());
- // NOTREACHED
- }
- // new account
- $_SESSION['register'] = 1;
- $openid->required = array('namePerson/friendly', 'contact/email', 'namePerson');
- $openid->optional = array('namePerson/first','media/image/aspect11','media/image/default');
- goaway($openid->authUrl());
- // NOTREACHED
- }
+ $openid->returnUrl = $a->get_baseurl(true) . '/openid';
+ goaway($openid->authUrl());
+ // NOTREACHED
}
}
if((x($_POST,'auth-params')) && $_POST['auth-params'] === 'login') {