aboutsummaryrefslogtreecommitdiffstats
path: root/include/auth.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-04-03 21:36:29 -0400
committerAndrew Manning <tamanning@zoho.com>2016-04-03 21:36:29 -0400
commit0523b4b2f1012a8b5f3bffb7f136a20dc9a4e43f (patch)
treea92197de4503ec52889dc05483493f4df1a305b8 /include/auth.php
parent99d9456b3addc651a68874ddd391d25684252c4d (diff)
parentb4c1baada1fba46d4d75f40a7e78111d70d54e7a (diff)
downloadvolse-hubzilla-0523b4b2f1012a8b5f3bffb7f136a20dc9a4e43f.tar.gz
volse-hubzilla-0523b4b2f1012a8b5f3bffb7f136a20dc9a4e43f.tar.bz2
volse-hubzilla-0523b4b2f1012a8b5f3bffb7f136a20dc9a4e43f.zip
Merge branch 'master' of https://github.com/redmatrix/hubzilla into contextual-help
Diffstat (limited to 'include/auth.php')
-rw-r--r--include/auth.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/auth.php b/include/auth.php
index 1a7110c20..aaec45c40 100644
--- a/include/auth.php
+++ b/include/auth.php
@@ -97,7 +97,7 @@ if((isset($_SESSION)) && (x($_SESSION, 'authenticated')) &&
// process a logout request
- if(((x($_POST, 'auth-params')) && ($_POST['auth-params'] === 'logout')) || ($a->module === 'logout')) {
+ if(((x($_POST, 'auth-params')) && ($_POST['auth-params'] === 'logout')) || (App::$module === 'logout')) {
// process logout request
$args = array('channel_id' => local_channel());
call_hooks('logging_out', $args);
@@ -128,13 +128,13 @@ if((isset($_SESSION)) && (x($_SESSION, 'authenticated')) &&
dbesc($_SESSION['visitor_id'])
);
if($r) {
- get_app()->set_observer($r[0]);
+ App::set_observer($r[0]);
}
else {
unset($_SESSION['visitor_id']);
unset($_SESSION['authenticated']);
}
- $a->set_groups(init_groups_visitor($_SESSION['visitor_id']));
+ App::set_groups(init_groups_visitor($_SESSION['visitor_id']));
}
// already logged in user returning
@@ -183,7 +183,7 @@ if((isset($_SESSION)) && (x($_SESSION, 'authenticated')) &&
);
if(($r) && (($r[0]['account_flags'] == ACCOUNT_OK) || ($r[0]['account_flags'] == ACCOUNT_UNVERIFIED))) {
- get_app()->account = $r[0];
+ App::$account = $r[0];
$login_refresh = false;
if(! x($_SESSION,'last_login_date')) {
$_SESSION['last_login_date'] = datetime_convert('UTC','UTC');
@@ -237,16 +237,16 @@ else {
$record = $addon_auth['user_record'];
}
else {
- $record = get_app()->account = account_verify_password($_POST['username'], $_POST['password']);
+ $record = App::$account = account_verify_password($_POST['username'], $_POST['password']);
- if(get_app()->account) {
- $_SESSION['account_id'] = get_app()->account['account_id'];
+ if(App::$account) {
+ $_SESSION['account_id'] = App::$account['account_id'];
}
else {
notice( t('Failed authentication') . EOL);
}
- logger('authenticate: ' . print_r(get_app()->account, true), LOGGER_DEBUG);
+ logger('authenticate: ' . print_r(App::$account, true), LOGGER_DEBUG);
}
if((! $record) || (! count($record))) {