Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

need help echoing just the username

edited February 2012 in Vanilla 2.0 - 2.8

hi i have a hidden form in my site.

i just need to echo the username, but what's happening is it's also echoing the span class for message received and activities

thus echoing this on the page

user: administrator 8 <-- the 8 is the number of message and notifications received.

Best Answer

  • peregrineperegrine MVP
    edited February 2012 Answer ✓

    Why don't post your code?
    you could could parse it any number of ways to pull out the name.
    or if you were inside discussions you would echo $Author->Name
    to show the username of the discussion.

    or do you mean the user who is logged in which would be:
    var_dump($Session->User->Name);

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Answers

  • peregrineperegrine MVP
    edited February 2012 Answer ✓

    Why don't post your code?
    you could could parse it any number of ways to pull out the name.
    or if you were inside discussions you would echo $Author->Name
    to show the username of the discussion.

    or do you mean the user who is logged in which would be:
    var_dump($Session->User->Name);

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • $Session->User->Name; this one works :)

  • thanks

Sign In or Register to comment.