Developer forum

Forum » CMS - Standard features » Password Recovery

Password Recovery

Morten Berendtsen
Reply

Not entirely sure this actually belongs in this section, but the solution im looking for is a paragaph of sorts so ill give it a try.


ive just implemented a login funktion for our website and its working like a charm, the important bit here is that this funktions without any javascript as we are trying to keep these at a bare minimum. Code looks like this.

        <div id="login">
<!--@If(Global:Extranet.UserID==0)--> <!--@If(Server:Request.username<defined> || Server:Request.password<defined>)-->
<div class="alert alert-error">Invalid username or password</div>
<!--@EndIf-->
<form method="post">
  <div id="name">
    <span id="UsernameText">Username: </span><input type="text" name="username" value="<!--@If(Server:Request.username<defined>)--><!--@Server:Request.username--><!--@EndIf-->" style="width:200px" />
  </div>  
  <div id="pass">
    <span id="ShowPasswordText">Password: </span><input type="password" name="password" value="<!--@If(Server:Request.password<defined>)--><!--@Server:Request.password--><!--@EndIf-->" style="width:200px" />     
  </div>  
  <div id="subbutton">
  <button type="submit">Sign in</button>
  <button type="button" onclick="location.href='Default.aspx?ID=195#195'">New User</button>
  </div>
</form>
<!--@Else-->
<div class="alert alert-info">Welcome, <!--@Global:Extranet.UserName-->   <button type="submit" onclick="location.href='/Admin/Public/ExtranetLogoff.aspx'">Sign out</button><button type="submit" onclick="location.href='Default.aspx?ID=199#199'">View profile</button></div>
<!--@EndIf-->

Now what im trying to do is add a button to a page (not the issue) that funktions as a recover password funktion. However im not sure if its posible to implement this in the same way.

Any and all assistance is apreciated.


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Morten

The form for forgot password looks like this:

<form method="post" action="<!--@DWExtranetAction-->">
    <input type="text" name="Username">
    <input type="checkbox" name="ForgotPassword" value="True" checked="checked">
    <input type="hidden" name="ForgotPasswordConfirm" value="Your password have been send to you by mail.">
    <input type="submit" />
</form>

BR Nicolai

 

You must be logged in to post in the forum