From fcf3dbcfc13888a795a85f54179dfd548b34d4aa Mon Sep 17 00:00:00 2001 From: Tom Needham Date: Tue, 31 Jul 2012 15:02:51 +0100 Subject: [PATCH] Require a username for OC_OAuth::registerConsumer() --- lib/oauth.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/oauth.php b/lib/oauth.php index f0341b4b0d..98678d2911 100644 --- a/lib/oauth.php +++ b/lib/oauth.php @@ -77,9 +77,8 @@ class OC_OAuth { * @param string $user the owncloud user adding the consumer * @return array the consumers details including secret and key */ - public static function registerConsumer($details, $user=null){ + public static function registerConsumer($details, $user){ self::init(); - $user = is_null($user) ? OC_User::getUser() : $user; $consumer = self::$store->updateConsumer($details, $user, OC_Group::inGroup($user, 'admin')); return $consumer; }