We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29030
    • 27 Posts
    I need every user that signs up via the WebSignup snippet to go to document ID XX. This also automatically adds the user to the document group that I want.

    Update:

    I figured it out. I think this code added to /assets/snippets/weblogin/websignup.inc.php file will do the trick:

    $sql = "INSERT INTO ".$modx->getFullTableName("web_user_settings")." (webuser , setting_name, setting_value)
    VALUES($key, ’login_home’, ’63’);";
    $rs = $modx->db->query($sql);
    if(!$rs){
    $output = webLoginAlert("An error occured while attempting to save the user’s settings.").$tpl;
    return;
    }

    $sql = "INSERT INTO ".$modx->getFullTableName("web_groups")." (webgroup,webuser)
    VALUES(’1’, $key);";
    $rs = $modx->db->query($sql);
    if(!$rs){
    $output = webLoginAlert("An error occured while attempting to save the user’s settings.").$tpl;
    return;
    }

    I’m fairly new to this stuff so i’m a bit slow at it but my 3 hours of work has paid off and I have a happy customer. Yee Haw!