• I have set up Theme My Login in orden to keeper users away from the backend.
    So far so good, however, not all user information are shown at the TML User Profile Page.
    What is missing is some info added to the user profile by other plugins.

    How come that not all info is visible and how to fix the issue?

    https://ww.wp.xz.cn/plugins/theme-my-login/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    TML calls the same hooks as the regular profile page. Unless the other plugins do some other kind of check like is_admin(), it should work as expected.

    Thread Starter stidsen

    (@stidsen)

    I am loggin in as Admin, so there should be no conflict with user roles.

    See screendump at: http://stidsen.dk/WP-Profile.jpg
    To the left is the TML Profile Page, to the right is the standard WP Profile Page. (Sorry for the language not beeing English)
    As you can see, all the shown additional user information is not shown on the TML Profile page.

    I have tried to locate the code creating the pages, but I am not 100% sure I am looking in the correct files.

    In /wp-admin/user-edit.php this code is found as the last part before the “Submit” button. I assume this is the piece of code placing the additional information at the Profile Page:

    <?php
    /**
     * Filter whether to display additional capabilities for the user.
     *
     * The 'Additional Capabilities' section will only be enabled if
     * the number of the user's capabilities exceeds their number of
     * roles.
     *
     * @since 2.8.0
     *
     * @param bool    $enable      Whether to display the capabilities. Default true.
     * @param WP_User $profileuser The current WP_User object.
     */
    if ( count( $profileuser->caps ) > count( $profileuser->roles )
        && apply_filters( 'additional_capabilities_display', true, $profileuser )
    ) : ?>
    <h2><?php _e( 'Additional Capabilities' ); ?></h2>
    <table class="form-table">
    <tr class="user-capabilities-wrap">
        <th scope="row"><?php _e( 'Capabilities' ); ?></th>
        <td>
    <?php
        $output = '';
        foreach ( $profileuser->caps as $cap => $value ) {
            if ( ! $wp_roles->is_role( $cap ) ) {
                if ( '' != $output )
                    $output .= ', ';
                $output .= $value ? $cap : sprintf( __( 'Denied: %s' ), $cap );
            }
        }
        echo $output;
    ?>
        </td>
    </tr>
    </table>
    <?php endif; ?>

    In the /wp-content/themes/heatmap-adaptive/profile-form.php which I assume is the file creating the TML Profile form, the above piece of code is not found. Does that mean the TML Profile Form does not include the additional information?

    If yes, how do I solve this?
    If not, please guide me to look in the correct files.
    Thank you.

    Plugin Author Jeff Farthing

    (@jfarthing84)

    is_admin doesn’t check user roles, it simply checks if you are in /wp-admin. With TML’s Themed Profile, this is not the case, so this check would fail.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Additional User information not shown’ is closed to new replies.