The problem
I have a login form available on every page (in the right menu). The problem is that when the user is on the register page, the fields from the login form are validated. I have username and password fields in both forms, and both are validated.
Ideas:
- Different field names for registration form (register_username, register_password, register_email) and then set normal names before saving.
- Different model (but albo using the users table) for login form?
Anyway, I just wonder what is the best way to solve this.
I’m guessing that both forms would submit to different actions, with the registration form submitting to
Users->register()and the login form submitting toUsers->login().I would suggest that when you’re in the
register()action, you could try copying the relevant variable into another associative array and then validating and saving that, rather than validating and saving the$this->datavariable.