General developer forum

Adding "sign up user" in alternate log in page

Picture of Mridul Banik
Adding "sign up user" in alternate log in page

Hello there,
I have developed an alternate log in php script which successfully log in user to a dashboard. However, I want to add sign up user in my alternate log in script. Can anyone please how to do that? I have seen the normal procedure but getting stuck to implement it in the alternate log in script.
Thanks in Advance.

Average of ratings: -
Picture of oliver stearn
Re: Adding "sign up user" in alternate log in page

Hard to say what the best procedure is here based on the information you provided. 

Where is the script? is is just a custom login page, or is it a authentication method? 

Easiest way would be to direct them to /login/signup.php - or create a user object from a custom form and pass it to $authplugin->user_signup()... but that feels like an unnecessary amount of work. Why not just adapt what is there? 

Average of ratings: -
Picture of Mridul Banik
Re: Adding "sign up user" in alternate log in page



<!DOCTYPE html>



<form action="http:............/login/index.php">

  <div class="container">

<input type="text" name="username" id="username" class="form-control" value="" placeholder="Username">

<input type="password" name="password" id="password" value="" class="form-control" placeholder="Password">

    <button type="submit">Login</button>




this is a simple login form, working as a landing page when a user inserts username, password the authentication process done by login/index.php. Now, this form only contains log in option, no sign-up option. If I have a signup button, Is it enough to redirect it login/signup.php for executing sign up procedure?

Average of ratings: -