Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 02:41 am EDT

Geeklog Forums

Custom Registration Postback of variables failing


Status: offline

sacherjj

Forum User
Newbie
Registered: 05/07/07
Posts: 12
I'm implemented a custom registration, including custom user validation and everything works great, except for one thing. The post back of variables is not occurring when an error is detected with the data, the input fields are not getting repopulated.

It looks like it is doing a COM_refresh(), which generates a Meta Refresh, and killing all the $_POST variables. Is there an alternative method of doing this to preserve what the user entered? I'm debating adding the values to the query string and detect $_GET and $_POST at the beginning of my custom form to repopulate, but not sure if there is a better way.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
I don't see a COM_refresh in users.php, but there is one in the CUSTOM_loginErrorHandler in lib-custom.php. Try removing/commenting out the error handler function.

bye, Dirk
 Quote

Status: offline

sacherjj

Forum User
Newbie
Registered: 05/07/07
Posts: 12
The COM_refresh was the call in the CUSTOM_userCheck from the Custom Registration example I followed.

When I comment out CUSTOM_userCheck and type emails differently, I get the error message re: the emails and no fields are refilled.

I'll crawl through the normal registration path and try to get a better understanding of the process.
 Quote

Status: offline

sacherjj

Forum User
Newbie
Registered: 05/07/07
Posts: 12
Figured out the issue. I don't know if it was in the example I used or when I was removing functionality that I didn't need.

Inside CUSTOM_userform, the

$user_templates->set_var('fullname', $_POST['cust_fullname']);

lines were referencing an array named $A. I believe you were supposted to assign $A = $_POST or $_GET, depending on how you submitted the form. I just used $_POST directly. Everything working now. Thanks for the help.
 Quote

All times are EDT. The time is now 02:41 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content