diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-27 18:05:18 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-27 18:05:18 -0400 |
commit | 6a4c46e2c29eac2c6c0344c46ab18375608b5c5f (patch) | |
tree | 2fa595872b70991ba30fe2570ccef662d6ea4805 | |
parent | df9f5b902a39d94c0da221b5d767b19e1c35e680 (diff) | |
download | nextcloud-server-6a4c46e2c29eac2c6c0344c46ab18375608b5c5f.tar.gz nextcloud-server-6a4c46e2c29eac2c6c0344c46ab18375608b5c5f.zip |
Set the user id when authenticating user for Ampache, fixes bug oc-219
-rw-r--r-- | apps/media/lib_ampache.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/media/lib_ampache.php b/apps/media/lib_ampache.php index d5a093338cc..a041e9a884c 100644 --- a/apps/media/lib_ampache.php +++ b/apps/media/lib_ampache.php @@ -71,6 +71,7 @@ class OC_MEDIA_AMPACHE{ $pass=$users[0]['user_password_sha256']; $key=hash('sha256',$time.$pass); if($key==$auth){ + $token=hash('sha256','oc_media_'.$key); OC_MEDIA_COLLECTION::$uid=$users[0]['user_id']; $date=date('c');//todo proper update/add/clean dates @@ -150,6 +151,7 @@ class OC_MEDIA_AMPACHE{ $users=$query->execute(array($auth))->fetchAll(); if(count($users)>0){ OC_MEDIA_COLLECTION::$uid=$users[0]['user_id']; + OC_User::setUserId($users[0]['user_id']); return $users[0]['user_id']; }else{ return false; |