Displaying uid on user/x/ and user/x/edit page I want to display the uid (read-only) of the user on both the user/x and user/x/edit page.

By using the function below I managed to show the uid on the user/x/edit page.

function my_module_form_user_profile_form_alter(&amp;$form, &amp;$form_state, $form_id) {
    if (arg(0) == 'user') {
        $form['uid_read_only'] = array(
            '#markup' =&gt; 'User id : ' . '&lt;b&gt;' . arg(1) . '&lt;/b&gt;',
            '#weight' =&gt; -500,
            '#disabled' =&gt; TRUE,
        );
    }
}


How do I show the uid on the user/x page (view state)?
Implement hook_user_view() to show the uid on the user/x page.