Re: Getting uid of current profile page

Earnie Boyd <[email protected]>
Newsgroups gmane.comp.php.drupal.devel
Message-ID <CA+sc5mnNNGr2ghXj+_-XP7zGvhi0vZv0HkayUu7nYOwTPBm-pA@mail.gmail.com>
On Fri, Mar 9, 2012 at 7:46 AM, Andreas Laesser wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi @all
>
> Lets assume, that i want to something like:
>
>  <?php
>  $currentProfileUser="Here happens some magic"
>
>  print("<H3> $currentProfileUser is Member of ...</H3>");
>  ?>
>
> in the file: /drupal/modules/user/user-profile.tpl.php
>
> Can someone provide my some ideas how to get the uid from the current
> user profile page? I do not need the uid from the logged in viewing
> user, i need the uid from the user displayed at the current profile page.

global $user
The $user variable is an object of user information.
See api.drupal.org and search for user for a list of user functions.
The search form on that page should suggest items as you type.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.