How do I get the user ID from the $user_profile variable? How can I get the user ID and load the user with user_load() using the $user_profile variable in the user-profile.tpl.php template file?
You cannot get the uid from $user_profile as it does not contain any information we can use to get the current user.

To get the current user's object, use the following:

global $user;
echo $user-&gt;uid;