aboutsummaryrefslogtreecommitdiffstats
path: root/util/fresh
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-07-20 17:55:40 -0700
committerredmatrix <git@macgirvin.com>2016-07-20 17:55:40 -0700
commit3affb2e8172b4cc673aafe9551c21dad6f606d87 (patch)
tree446d143aa2b47b8fd710b5a4920ee63196b8fe34 /util/fresh
parentd54ad9880252cf8c6d2c61a01680279741735a36 (diff)
downloadvolse-hubzilla-3affb2e8172b4cc673aafe9551c21dad6f606d87.tar.gz
volse-hubzilla-3affb2e8172b4cc673aafe9551c21dad6f606d87.tar.bz2
volse-hubzilla-3affb2e8172b4cc673aafe9551c21dad6f606d87.zip
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.
Diffstat (limited to 'util/fresh')
-rwxr-xr-xutil/fresh7
1 files changed, 5 insertions, 2 deletions
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)