diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-05-01 18:50:31 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-05-01 18:50:31 +0200 |
commit | 70cea18cce0fcdb4d8118ff2d7abccc922417a6a (patch) | |
tree | 7f8c476cb75b38fea3ed4ad555f00885f6da2670 /apps/remoteStorage | |
parent | dc7cdda5ccc7d40bf9865e1af5a7846782ec700b (diff) | |
download | nextcloud-server-70cea18cce0fcdb4d8118ff2d7abccc922417a6a.tar.gz nextcloud-server-70cea18cce0fcdb4d8118ff2d7abccc922417a6a.zip |
ported getUser
Diffstat (limited to 'apps/remoteStorage')
-rwxr-xr-x[-rw-r--r--] | apps/remoteStorage/auth.php | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/remoteStorage/lib_remoteStorage.php | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/remoteStorage/templates/settings.php | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/apps/remoteStorage/auth.php b/apps/remoteStorage/auth.php index 69d7cfc3b93..682c1e97f6b 100644..100755 --- a/apps/remoteStorage/auth.php +++ b/apps/remoteStorage/auth.php @@ -56,7 +56,7 @@ if(count($pathParts) == 2 && $pathParts[0] == '') { $categories=$v; } } - $currUser = OC_User::getUser(); + $currUser = OCP\USER::getUser(); if($currUser == $ownCloudUser) { if(isset($_POST['allow'])) { //TODO: check if this can be faked by editing the cookie in firebug! diff --git a/apps/remoteStorage/lib_remoteStorage.php b/apps/remoteStorage/lib_remoteStorage.php index 6e6a19c739f..89dfc3247e9 100644..100755 --- a/apps/remoteStorage/lib_remoteStorage.php +++ b/apps/remoteStorage/lib_remoteStorage.php @@ -14,7 +14,7 @@ class OC_remoteStorage { } public static function getAllTokens() { - $user=OC_User::getUser(); + $user=OCP\USER::getUser(); $query=OC_DB::prepare("SELECT token,appUrl,category FROM *PREFIX*authtoken WHERE user=? LIMIT 100"); $result=$query->execute(array($user)); $ret = array(); @@ -28,19 +28,19 @@ class OC_remoteStorage { } public static function deleteToken($token) { - $user=OC_User::getUser(); + $user=OCP\USER::getUser(); $query=OC_DB::prepare("DELETE FROM *PREFIX*authtoken WHERE token=? AND user=?"); $result=$query->execute(array($token,$user)); return 'unknown';//how can we see if any rows were affected? } private static function addToken($token, $appUrl, $categories){ - $user=OC_User::getUser(); + $user=OCP\USER::getUser(); $query=OC_DB::prepare("INSERT INTO *PREFIX*authtoken (`token`,`appUrl`,`user`,`category`) VALUES(?,?,?,?)"); $result=$query->execute(array($token,$appUrl,$user,$categories)); } public static function createCategories($appUrl, $categories) { $token=uniqid(); - OC_Util::setupFS(OC_User::getUser()); + OC_Util::setupFS(OCP\USER::getUser()); self::addToken($token, $appUrl, $categories); foreach(explode(',', $categories) as $category) { //TODO: input checking on $category diff --git a/apps/remoteStorage/templates/settings.php b/apps/remoteStorage/templates/settings.php index b940282b2cc..147378dda39 100644..100755 --- a/apps/remoteStorage/templates/settings.php +++ b/apps/remoteStorage/templates/settings.php @@ -2,7 +2,7 @@ <?php echo '<img src="../apps/remoteStorage/remoteStorage.png" style="width:16px"> ' .'<strong>'.$l->t('remoteStorage').'</strong> user address: ' - .OC_User::getUser().'@'.$_SERVER['SERVER_NAME'] + .OCP\USER::getUser().'@'.$_SERVER['SERVER_NAME'] .' (<a href="http://unhosted.org/">more info</a>)'; ?> <p><em>Apps that currently have access to your ownCloud:</em></p> |