Skip to content

Instantly share code, notes, and snippets.

@Heateor
Created June 12, 2023 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Heateor/4a9a279da2de609ef817d3a6fa243dc5 to your computer and use it in GitHub Desktop.
Save Heateor/4a9a279da2de609ef817d3a6fa243dc5 to your computer and use it in GitHub Desktop.
/**
* Show if this is a Social Login user
*/
function heateor_show_if_social_login() {
global $user_ID;
?>
<table class="form-table">
<tbody>
<tr>
<th><label>Social Login User</label></th>
<td><?php echo get_user_meta( isset( $_GET['user_id'] ) ? intval( $_GET['user_id'] ) : $user_ID, 'heateorsl_social_id', true ) ? __( 'Yes', 'heateor-social-login' ) : __( 'No', 'heateor-social-login' ); ?></td>
</tr>
</tbody>
</table>
<?php
}
add_action( 'show_user_profile', 'heateor_show_if_social_login' );
add_action( 'edit_user_profile', 'heateor_show_if_social_login' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment