Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By niceggal1 on
As far as I know, I can get the UID of the currently logged in user with the following code:
global $user;
echo $user->uid;
However, when I put the above code in the basic page, I always get the UID of the author of the node.
Please help me to resolve this issue.