You are here

public function OAuthStoreOracle::deleteConsumer in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.2 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::deleteConsumer()
  2. 7.3 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::deleteConsumer()
  3. 7.4 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::deleteConsumer()
  4. 7.5 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::deleteConsumer()
  5. 7.6 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::deleteConsumer()

* Delete a consumer key. This removes access to our site for all applications using this key. * *

Parameters

string consumer_key: * @param int user_id user registering this server * @param boolean user_is_admin

Overrides OAuthStoreAbstract::deleteConsumer

File

lib/oauth-php/library/store/OAuthStoreOracle.php, line 849

Class

OAuthStoreOracle

Code

public function deleteConsumer($consumer_key, $user_id, $user_is_admin = false) {

  //
  $sql = "BEGIN SP_DELETE_CONSUMER(:P_CONSUMER_KEY, :P_USER_ID, :P_USER_IS_ADMIN, :P_RESULT); END;";

  // parse sql
  $stmt = oci_parse($this->conn, $sql) or die('Can not parse query');

  // Bind In and Out Variables
  oci_bind_by_name($stmt, ':P_CONSUMER_KEY', $consumer_key, 255);
  oci_bind_by_name($stmt, ':P_USER_ID', $user_id, 40);
  oci_bind_by_name($stmt, ':P_USER_IS_ADMIN', $user_is_admin, 40);
  oci_bind_by_name($stmt, ':P_RESULT', $result, 20);

  //Execute the statement
  oci_execute($stmt);

  //
}