From bc8c74eb422387a5537eb923c90a34c1196ce568 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 20 Jul 2016 17:55:40 -0700 Subject: sort out some of the authentication mess - with luck this may fix the DAV auth issue which I simply could not duplicate or find a reason for. --- util/fresh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'util/fresh') diff --git a/util/fresh b/util/fresh index 9d74ea584..7f57931aa 100755 --- a/util/fresh +++ b/util/fresh @@ -82,12 +82,15 @@ function process_command($line) { exec('/bin/stty echo'); echo "\n"; require_once('include/auth.php'); - $record = App::$account = account_verify_password(argv(1),trim($x,"\n")); + $record = null; + $x = account_verify_password(argv(1),trim($x,"\n")); + if($x['account']) + $record = App::$account = $x['account']; if($record) { $_SESSION['account_id'] = App::$account['account_id']; $_SESSION['last_login_date'] = datetime_convert(); - authenticate_success($record, true, true); + authenticate_success($record, $x['channel'], true, true); echo 'logged in'; $channel = App::get_channel(); if($channel) -- cgit v1.2.3