Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Custom log in/people form

edited January 2007 in Vanilla 1.0 Help
My website has a single log in form for the site itself and Vanilla. This is working fairly well, but I've come across a problem. My form submits to people.php (as Vanilla's own sign-in page does) and works fine as long as I get the username/password right. However, if I get them wrong, it redirects me to Vanilla's own log in form and displays the error message 'The requested e-mail address and password combination could not be found' or similar. What I need to do is get it to redirect to my own custom log in form and display the error. Can it be done? I've checked the conf/settngs.php file and can't seem to see it in there.


  • I was wondering how you implented your own login form with the vanilla login procedure, care to share your approach?
  • I suspect all you need to do is tag a ?ReturnUrl=whatever.php onto your people.php call?
  • Hi Minisweeper, Thanks for your comment. I have added that parameter to the people.php call, and it works if the login is successful. I get returned to loginsuccess.php which is my Welcome page when the user has logged in. Here's a snippet of my code: <form id="frmSignIn" method="post" action="forum/people.php?ReturnUrl=login.php"><input type="hidden" name="PostBackAction" value="SignIn" /> <input type="hidden" name="ReturnUrl" value="http://<?=$_SERVER['SERVER_NAME'];?>/loginsuccess.php" /> <label for="txtUsername" class="form_labels_short">Email</label> <input id="txtUsername" type="text" name="Username" value="" class="form_txtfldmedium" maxlength="30" /><br /> <label for="txtPassword" class="form_labels_short">Password</label> <input id="txtPassword" type="password" name="Password" value="" class="form_txtfldmedium" /><br /><br /> <label for="RememberMeID"><input type="checkbox" name="RememberMe" value="1" id="RememberMeID" /> Remember me</label><br /><br /> <input type="submit" name="btnSignIn" value="Proceed" class="Button" /> <p><a href="forgotpword.php">Forgotten your password?</a></p> <p class="notopmargin"><a href="register.php">Register</a></p> </form> However, if the login is not successful, e.g. I have input the wrong username and password, then I would like to return to ym own login form, rather than Vanillas. Even with ?ReturnUrl=login.php added to the form action, I am still returned to Vanilla's login (people.php) with the following querystring: /forum/people.php?ReturnUrl=loginsuccess.php In this case it appears that ReturnUrl is ignored. Any ideas? J-Rox, when I have solved this problem I will post my login procedure here! Hope to save someone else this struggle!
This discussion has been closed.