We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cda09b8 commit 610fe99Copy full SHA for 610fe99
admin.php
@@ -18,10 +18,13 @@ function rest_oauth1_profile_section( $user ) {
18
global $wpdb;
19
20
$results = $wpdb->get_col( "SELECT option_value FROM {$wpdb->options} WHERE option_name LIKE 'oauth1_access_%'", 0 );
21
- $results = array_map( 'unserialize', $results );
22
- $approved = array_filter( $results, function ( $row ) use ( $user ) {
23
- return $row['user'] === $user->ID;
24
- } );
+ $approved = array();
+ foreach ( $results as $result ) {
+ $row = unserialize( $result );
+ if ( $row['user'] === $user->ID ) {
25
+ $approved[] = $row;
26
+ }
27
28
29
$authenticator = new WP_REST_OAuth1();
30
0 commit comments