The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
handle existing join+login page - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: General (https://userspice.com/forums/forumdisplay.php?fid=20)
+--- Forum: New to UserSpice? (https://userspice.com/forums/forumdisplay.php?fid=22)
+--- Thread: handle existing join+login page (/showthread.php?tid=418)

Pages: 1 2


handle existing join+login page - JUG - 04-19-2017

Ok. Looks like I figured it out. login.php and join.php created token when I combined join+login page. I just removed one token and everithing works fine now. It would be great if you could include login+join page in future release, so others can use that option too. I think it makes sense.

Regards, Jakob


handle existing join+login page - mudmin - 04-20-2017

I've spent a good bit of time trying to get those forms to play nicely together and I just can't get it to work. I'm open to any user submitted ideas. The OAUTH logins already work that way. They don't care whether you have an account already or not as far as the front end user sees.


handle existing join+login page - JUG - 04-21-2017

Files on pastebin: login.php
_join.php

It is not thoroughly tested, but it works.


handle existing join+login page - robertcoroianu - 05-16-2017

Thx JUG for your code, here is an ideeaSmile
I use switch to handle form action like this:
- in register form
Code:
<input type="hidden" name="action" value="register" />
- in login form
Code:
<input type="hdden" name="action" value="login" />
and then in php code
<pre>
Code:
$action = $_POST['action'];
    switch ($action) {
       case 'login' :
// Login code
break;
case 'register' :
// Register code
break;
}
</pre>