Support » Themes and Templates » P2 » [Resolved] get the user ID (for PM plugin)

[Resolved] get the user ID (for PM plugin)

  • I’m using the Private messaging plugin by http://cartpauj.com/ It works very well with P2. I’m trying to place a link next to each username in a post that opens the send message box with the username prefilled.

    The code looks like this
    <a href="http://mydomain/messaging/?pmaction=newmessage&to=<?php echo $user_ID; ?>">PM me</a>

    Ok, the end part <?php echo $user_ID; ?> should get the userID as a number and if it worked the PM link would function correctly.

    However in P2 it seems like we pull the user id in a different way and <?php echo $user_ID; ?> Just isn’t working to extract the ID

    Can anyone say how to get the user ID ?

Viewing 1 replies (of 1 total)
  • I finally got this to work, here’s the snippet in case anyone else is interested
    <a href="http://mydomain.com/the_messaging_page/?pmaction=newmessage&to=<?php the_author_ID(); ?>">PM me</a>

    Yeah, I got user and author mixed up!!! Duh

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] get the user ID (for PM plugin)’ is closed to new replies.
Skip to toolbar