diff options
| author | Horus3 | 2014-03-17 18:03:21 +0100 |
|---|---|---|
| committer | Horus3 | 2014-03-17 18:03:21 +0100 |
| commit | 889f10a8bea7105853ca505223dea1a1df07e0b9 (patch) | |
| tree | e7b85a68bc4239184e47a492a1e0ac0a00b088d6 /www/functions/func_user.php | |
| parent | 1c8afbfabc15a35f84290ca7320da0e9e373747e (diff) | |
| download | files.iamfabulous.de-889f10a8bea7105853ca505223dea1a1df07e0b9.tar.gz | |
func mkdir
Diffstat (limited to 'www/functions/func_user.php')
| -rwxr-xr-x | www/functions/func_user.php | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/www/functions/func_user.php b/www/functions/func_user.php index 5ee342f..bc72a93 100755 --- a/www/functions/func_user.php +++ b/www/functions/func_user.php @@ -11,27 +11,14 @@ function account($db){ return true; } -function user($db, $user){ +function user_id($db, $user){ $owner_db = $db->query("SELECT id FROM user WHERE name='" . SQLite3::escapeString($user) . "';"); $owner_ar = $owner_db->fetchArray(SQLITE3_NUM); - if(empty($owner_ar)){ + if(empty($owner_ar[0])){ return false; } $owner = $owner_ar[0]; return $owner; } - -function user_is_owner($username, $file_id){ - $db = $GLOBALS["db"]; - - $owner_db = $db->query("SELECT owner FROM files WHERE id=". SQLite3::escapeString('$file_id') . ";"); - $owner_ar = $owner_db->fetchArray(SQLITE3_NUM); - - if($owner_ar[0] != $username){ - return false; - } else { - return true; - } -} |
