users_repo = $users_repo; } /** * Add actions and filters for the profile page. * * @deprecated - 3.10.0, will move add_action calls out of this class in the next major. * * @codeCoverageIgnore - Deprecated. */ public function init() { add_action( 'edit_user_profile', array( $this, 'show_delete_identity' ) ); add_action( 'show_user_profile', array( $this, 'show_delete_identity' ) ); add_action( 'wp_ajax_auth0_delete_data', array( $this, 'delete_user_data' ) ); } /** * Show the delete Auth0 user data button. * Hooked to: edit_user_profile, show_user_profile * IMPORTANT: Internal callback use only, do not call this function directly! */ public function show_delete_identity() { if ( ! isset( $GLOBALS['user_id'] ) || ! current_user_can( 'edit_users', $GLOBALS['user_id'] ) ) { return; } $auth0_user = get_auth0userinfo( $GLOBALS['user_id'] ); if ( ! $auth0_user ) { return; } ?>
|
|