Explorar el Código

UNA Market like on Boonex site: OAuth module.

AntonLV hace 10 años
padre
commit
376ede1aae

+ 6 - 0
modules/boonex/oauth2/classes/BxOAuthDb.php

@@ -16,6 +16,12 @@ class BxOAuthDb extends BxDolModuleDb
         parent::__construct($oConfig);
     }
 
+	function getClient($sClientId)
+    {
+        $sQuery = $this->prepare("SELECT * FROM `bx_oauth_clients` WHERE `client_id` = ?", $sClientId);
+        return $this->getOne($sQuery);
+    }
+
     function getClientTitle($sClientId)
     {
         $sQuery = $this->prepare("SELECT `title` FROM `bx_oauth_clients` WHERE `client_id` = ?", $sClientId);

+ 5 - 0
modules/boonex/oauth2/classes/BxOAuthModule.php

@@ -132,6 +132,11 @@ class BxOAuthModule extends BxDolModule
         ));
     }
 
+    function serviceGetClient ($sClientId)
+    {
+    	return $this->_oDb->getClient($sClientId);
+    }
+
     function studioSettings ()
     {
         if (!isAdmin()) {