We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10152
    • 156 Posts
    Hello, how do I just get the user id from php script called in my page ?

    I tried $username...

    EDIT : ok I think i got it :
    $uid = $modx->getLoginUserID();
    $userid=$uid[0];
      • 9130
      • 171 Posts
      I assume by php script you mean a snippet. Should be
      $modx->getLoginUserID()
      According to the api pages
        • 10152
        • 156 Posts
        Thanks for your answer, I’m not so newbie with modx but I’ve never tried to do this.