We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2139
    • 3 Posts
    I created a snippet with the following code but I dont get the email address.

    <?php
    $userID = $modx->getLoginUserID();
    $table = $modx->getFullTableName("web_user_attributes");
    $userEmail = $modx->db->select("email" ,$table, "id = $userID", "", "");
    echo $userID;
    echo "
    ";
    echo $userEmail;
    ?>


    This returns the following:

    1
    Resource id #14


    Where am i going wrong?

    Thanks
    davehaslam@davehaslam.co.uk
      • 4310
      • 2,310 Posts
      <?php
      print_r($_SESSION[’webEmail’]);
      ?>