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 WilmethMedia on
Hello,
I am trying to figure out how to add the image for the logged in user to a template file.
I have tried the following:
print $user_picture;
and I receive this error:
Notice: Undefined variable: user_picture in include()
I see this in another template file and figured it would work in the template file I am editing. What am I doing wrong?
Thanks,
Garry
Comments
You might want to check to
You might want to check if a picture has been uploaded with a simple conditional statement, and maybe have a default image fallback, but this should work:
I got it .Its work's great.
I got it .Its work's great. Thanks turbogeek.