Title: PHP to identify user.id
Last modified: March 1, 2022

---

# PHP to identify user.id

 *  Resolved [ossvale](https://wordpress.org/support/users/ossvale/)
 * (@ossvale)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/php-to-identify-user-id/)
 * Hello,
    I use Ultimate Member as a plugin to a casting/actors website to store
   all the talents data. I would like to add a Download button to download the talent
   photo/information using the E2Pdf plugin. At their support they told me to add
   some PHP code to the talent page, this one
 * $user_id = ‘1’;
    echo do_shortcode(‘[e2pdf-download id=”1″ dataset=”2524″ user_id
   =”‘.$user_id.'”]’);
 * and use it to display the button. It works, as you can see here (use the download
   link):
    [https://wp.trentinocasting.com/?page_id=1854&um_user=ossvale](https://wp.trentinocasting.com/?page_id=1854&um_user=ossvale)
   but as you can see, the $user_id variable is static (at this moment =1) but I
   would like to get the user_id of the current user being displayed in that page.
   How can I get this info? And how in PHP?
 * Thanks
 * Valerio
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-to-identify-user-id%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [missveronica](https://wordpress.org/support/users/missveronicatv/)
 * (@missveronicatv)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/php-to-identify-user-id/#post-15416994)
 * [@ossvale](https://wordpress.org/support/users/ossvale/)
 * You can use `um_profile_id()` for the current Profile Page user ID.
 * [https://docs.ultimatemember.com/article/34-get-the-current-user-profile-id](https://docs.ultimatemember.com/article/34-get-the-current-user-profile-id)
 *  Plugin Support [Ultimate Member Support](https://wordpress.org/support/users/ultimatemembersupport/)
 * (@ultimatemembersupport)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/php-to-identify-user-id/#post-15432365)
 * Hi [@ossvale](https://wordpress.org/support/users/ossvale/),
 *  This thread has been inactive for a while, so we will go ahead and mark it Resolved.
 * Please feel free to re-open this thread by changing the Topic Status to ‘Not 
   Resolved’ if any other questions come up and we’d be happy to help. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP to identify user.id’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Ultimate Member Support](https://wordpress.org/support/users/ultimatemembersupport/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/php-to-identify-user-id/#post-15432365)
 * Status: resolved