summaryrefslogtreecommitdiffstats
path: root/play/index.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-07-09 07:49:59 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-07-09 07:49:59 +0000
commitc5d6e04d114d3c4b3f31743ccd0d4a60c9ef9632 (patch)
treebc3196cb97d63079013ebfc5b183d2038ee7c9e7 /play/index.php
parentc9170314af9139abef87629d218c7999bd3c8df3 (diff)
downloadampache-c5d6e04d114d3c4b3f31743ccd0d4a60c9ef9632.tar.gz
ampache-c5d6e04d114d3c4b3f31743ccd0d4a60c9ef9632.tar.bz2
ampache-c5d6e04d114d3c4b3f31743ccd0d4a60c9ef9632.zip
removed ID field from user table, and everything that goes with that...
Diffstat (limited to 'play/index.php')
-rw-r--r--play/index.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/play/index.php b/play/index.php
index 8555f444..3772d8de 100644
--- a/play/index.php
+++ b/play/index.php
@@ -39,7 +39,7 @@ $sid = htmlspecialchars($_REQUEST['sid']);
/* Misc Housework */
$dbh = dbh();
-$user = new User(0,$uid);
+$user = new User($uid);
if (conf('require_session') && !conf('xml_rpc')) {
if(!session_exists($sid)) {
@@ -90,7 +90,10 @@ if ( isset( $uid ) ) {
echo "Error: No Song";
exit;
}
- if ($song->status === 'disabled') {
+ if ($song->status == '0') {
+ if (conf('debug')) {
+ log_event($user->username,' song_disabled ',"Error: $song->file is currently disabled, song skipped");
+ }
exit;
}
if ($user->disabled == '1') {
@@ -100,9 +103,9 @@ if ( isset( $uid ) ) {
echo "Error: User Disabled";
exit;
}
- if (!$user->id && !$user->is_xmlrpc()) {
+ if (!$user->username && !$user->is_xmlrpc()) {
if (conf('debug')) {
- log_event($user->username,' user_not_found ',"Error $user->id not found, stream access denied");
+ log_event($user->username,' user_not_found ',"Error $user->username not found, stream access denied");
}
echo "Error: No User Found";
exit;