LLMS_REST_Authentication::find_key( string $consumer_key )
Find a key via unhashed consumer key
Parameters Parameters
- $consumer_key
-
(string) (Required) An unhashed consumer key.
Return Return
(LLMS_REST_API_Key|false)
Source Source
File: libraries/lifterlms-rest/includes/class-llms-rest-authentication.php
protected function find_key( $consumer_key ) { global $wpdb; $consumer_key = llms_rest_api_hash( $consumer_key ); $key_id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$wpdb->prefix}lifterlms_api_keys WHERE consumer_key = %s", $consumer_key ) ); // no-cache ok. if ( $key_id ) { return LLMS_REST_API()->keys()->get( $key_id ); } return false; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.1 | Introduced. |