03-13-2017, 10:14 AM
What if I want to combine login.php with join.php?
I copied join.php logic to login.php and added _join.php view to the login.php. Next I changed $form_action ='join.php' to $form_action = 'login.php', so when I click register button I'm not sended away to join.php anymore.
Now here I'm stuck with some problems. If I now try to login OR register, I get Token doesn\'t match! message, after I click on login or register button.
I have tried to delete this line '<input type="hidden" value="<?=Token::generate();?>" name="csrf">' from login.php AND/OR from _join.php. I have tryed to rename tokens (from name="csrf" to name="csrf2") with no success. I have tried to comment out previous line of code and commented out the php logic that throws this error. But either way, the forms aren't working, or is only working one of them (either register or login).
@mudmin: can I somehow send you an PM?
I copied join.php logic to login.php and added _join.php view to the login.php. Next I changed $form_action ='join.php' to $form_action = 'login.php', so when I click register button I'm not sended away to join.php anymore.
Now here I'm stuck with some problems. If I now try to login OR register, I get Token doesn\'t match! message, after I click on login or register button.
I have tried to delete this line '<input type="hidden" value="<?=Token::generate();?>" name="csrf">' from login.php AND/OR from _join.php. I have tryed to rename tokens (from name="csrf" to name="csrf2") with no success. I have tried to comment out previous line of code and commented out the php logic that throws this error. But either way, the forms aren't working, or is only working one of them (either register or login).
@mudmin: can I somehow send you an PM?