public function OAuthStoreSQL::deleteServer in Lingotek Translation 7.2
Same name and namespace in other branches
- 7.7 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::deleteServer()
- 7.3 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::deleteServer()
- 7.4 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::deleteServer()
- 7.5 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::deleteServer()
- 7.6 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::deleteServer()
* Delete a server key. This removes access to that site. * *
Parameters
string consumer_key: * @param int user_id user registering this server * @param boolean user_is_admin
Overrides OAuthStoreAbstract::deleteServer
File
- lib/
oauth-php/ library/ store/ OAuthStoreSQL.php, line 404
Class
Code
public function deleteServer($consumer_key, $user_id, $user_is_admin = false) {
if ($user_is_admin) {
$this
->query('
DELETE FROM oauth_consumer_registry
WHERE ocr_consumer_key = \'%s\'
AND (ocr_usa_id_ref = %d OR ocr_usa_id_ref IS NULL)
', $consumer_key, $user_id);
}
else {
$this
->query('
DELETE FROM oauth_consumer_registry
WHERE ocr_consumer_key = \'%s\'
AND ocr_usa_id_ref = %d
', $consumer_key, $user_id);
}
}