ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Custom registration form submittal throws error

October 25, 2010 1:29pm

Subscribe [2]
  • #1 / Oct 25, 2010 1:29pm

    FuturShoc

    71 posts

    I’ve build a custom registration form into one of my templates. It seems to work fine for error trapping, but once the fields are correctly filled out, EE throws this error instead of successfully processing the registration:

    You are not authorized to perform this action

    (I’ve disabled the terms of service requirement in the EE control panel, btw.)

    My form:

    <form id='register_member_form' method="post" action="{site_url}"  >
                   <input type="hidden" name="XID" value="f5f63ec418563c0bc141ce307cca4d990cad0531" />
                   <input type="hidden" name="ACT" value="<?php echo $action_id; ?>" />
                   <input type="hidden" name="RET" value="{site_url}" />
                   <input type="hidden" name="FROM" value="" />
                 
                   Username: <input type="text" name="username" value="" maxlength="32" class="input" size="25" style="width:300px" /><br>
                   Password: <input type="password" name="password" value="" maxlength="32" class="input" size="25" style="width:300px" /><br>
                   Password confirm: <input type="password" name="password_confirm" value="" maxlength="32" class="input" size="25" style="width:300px" /><br>
                   Email: <input type="text" name="email" value="" maxlength="120" class="input" size="40" style="width:300px" /><br>
                   <input type="submit" value="Submit" class="submit" /></p>
                 </form>
  • #2 / Oct 26, 2010 9:45am

    Sue Crocker

    26054 posts

    http://expressionengine.com/wiki/Standalone_Registration_Form/ - If you look at the code listed there, you should be using

    <input type="hidden" name="XID" value="{XID_HASH}" />
  • #3 / Oct 26, 2010 10:35am

    FuturShoc

    71 posts

    That’s it! Thank you!!

  • #4 / Oct 26, 2010 10:49am

    FuturShoc

    71 posts

    😕 Oh, and I must apologize. Clearly, I didn’t read that entry thoroughly in the first place when I reused the code.

  • #5 / Oct 26, 2010 10:56am

    Sue Crocker

    26054 posts

    No worries - I’ve never tried it myself either. Glad things are working again. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases