aboutsummaryrefslogtreecommitdiffstats
path: root/include/auth.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-03-31 17:32:51 -0700
committerredmatrix <git@macgirvin.com>2016-03-31 17:32:51 -0700
commitc0b3d7e1b480ceeed89b71efd056ed9edda2dfef (patch)
tree433552545eb0c746fb48666afdb74ff472bf17b1 /include/auth.php
parent50d9b2934742ad9fb0dc8354d405789e3c14cd00 (diff)
parent9abd95fad3784a10fc48bc40f9b8a75d7d74edda (diff)
downloadvolse-hubzilla-c0b3d7e1b480ceeed89b71efd056ed9edda2dfef.tar.gz
volse-hubzilla-c0b3d7e1b480ceeed89b71efd056ed9edda2dfef.tar.bz2
volse-hubzilla-c0b3d7e1b480ceeed89b71efd056ed9edda2dfef.zip
Merge branch 'static'
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))) {