diff options
author | Karl Vollmer <vollmerk@ampache.org> | 2011-12-01 15:59:33 -0400 |
---|---|---|
committer | Karl Vollmer <vollmerk@ampache.org> | 2011-12-01 15:59:33 -0400 |
commit | 56eb2ac7dcfa0b7e0269612632b7944ff7b6b51f (patch) | |
tree | 3a469afc6428fabc8912210c76247c3aaa89052c /lib/init.php | |
parent | d1af05595c46c59a7d3992925d2ab6f0e14e5dbe (diff) | |
download | ampache-56eb2ac7dcfa0b7e0269612632b7944ff7b6b51f.tar.gz ampache-56eb2ac7dcfa0b7e0269612632b7944ff7b6b51f.tar.bz2 ampache-56eb2ac7dcfa0b7e0269612632b7944ff7b6b51f.zip |
Fixed two PHP warnings, and some issues with how users were being constructed
in init (which makes me wonder) and started trying to figure out why libre.fm broke
Diffstat (limited to 'lib/init.php')
-rw-r--r-- | lib/init.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/init.php b/lib/init.php index 045175d1..34821033 100644 --- a/lib/init.php +++ b/lib/init.php @@ -195,7 +195,7 @@ if (!defined('NO_SESSION') && Config::get('use_auth')) { vauth::check_session(); /* Create the new user */ - $GLOBALS['user'] = User::get_from_username($_SESSION['userdata']['username']); + $GLOBALS['user'] = new User($_SESSION['userdata']['uid']); /* If the user ID doesn't exist deny them */ if (!$GLOBALS['user']->id AND !Config::get('demo_mode')) { vauth::logout(session_id()); exit; } @@ -243,7 +243,7 @@ else { session_name(Config::get('session_name')); session_id(scrub_in($_REQUEST['sid'])); session_start(); - $GLOBALS['user'] = User::get_from_username($_SESSION['userdata']['username']); + $GLOBALS['user'] = new User($_SESSION['userdata']['uid']); } else { $GLOBALS['user'] = new User(); |