Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

New Addon: Getting the username

Discussion in 'cPanel Developers' started by intent-group, Oct 30, 2003.

  1. intent-group

    intent-group Member

    Joined:
    Oct 28, 2003
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    151
    Hi,

    I'm working on my own Addon into CPanel. The one thing that i'm trying to do is to get the username of the person logged into cpanel so that I can send this to a database and return various items from this.

    Therefore I'm gonna ned to use php. Can ayone tell me how I can get this username in PHP. It's REALLY annoying me now! lol

    Simon
     
  2. cyon

    cyon Well-Known Member
    PartnerNOC

    Joined:
    Jan 15, 2003
    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    166
    here u go:

    <?php
    $username = <cpanel print="$user">;
    ?>
     
  3. intent-group

    intent-group Member

    Joined:
    Oct 28, 2003
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    151
    ** sighs **

    Thank you.. lol.. ok it was very simple. i'd tried doing stuff with $PHP_AUTH_USER and all stuff like that.. Thought it had to be too simple..
     
Loading...

Share This Page