Developer forum

Forum » Templates » login attempt fail - error message

login attempt fail - error message

Espen Thorvaldsen
Reply

Hi all,

I am trying to use Extranet login. For now, if someone types in wrong username or password nothing happens.

Does DW has a possibility to show this error message or we have to think of some sort of work-around?

//Regards


Replies

 
Mikkel Ricky
Reply

We're currently working on a fix for this issue.

 
Mikkel Ricky
Reply

As a possible workaround you can use conditions to check if username and password have been submitted, but no users is signed in. In this case the sign in failed:

<!--@If(Server:Request.username<defined> && Server:Request.password<defined> && Global:Extranet.UserID==0)-->
	Invalid username or password
<!--@EndIf-->

A (more) complete sign in form could look like this

<!--@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">
	<input name="username" value="<!--@If(Server:Request.username<defined>)--><!--@Server:Request.username--><!--@EndIf-->"/>
	<input name="password" value="<!--@If(Server:Request.password<defined>)--><!--@Server:Request.password--><!--@EndIf-->"/>
	<button type="submit">Sign in</button>
</form>
<!--@Else-->
<div class="alert alert-info">
	Welcome, <!--@Global:Extranet.UserName-->
	<a href="/Admin/Public/ExtranetLogoff.aspx">Sign out</a>
</div>
<!--@EndIf-->

Best regards,
Mikkel
 

 

 
Anders Ebdrup
Reply

 

Original message by Mikkel Ricky posted on 10/06/2013, 15:24:

We're currently working on a fix for this issue.

+1

 
Nicolai Høeg Pedersen
Reply

Think I'm going to introduce a "Anders+1" button in the forums :).

 
Anders Ebdrup
Reply

 

Original message by Nicolai Høeg Pedersen posted on 11/06/2013, 15:24:

Think I'm going to introduce a "Anders+1" button in the forums :).

+1 :-)

 
Nuno Aguiar
Reply

Hi Mikkel,

 

Interesting use of if statements with . Please document it. I believe a lot of people would make a lot of use for them. I know I will ;)

 

Wonder if there are any other hidden statements not mentioned in http://templates.dynamicweb-cms.com/TemplateTags/Dynamicweb-template-tags/General-tags/If-statements.aspx :D

 

Nuno

 
Gaetan Di Caro
Reply

Hello,

Sorry to unearth an old topic, but I am having the issue and I wonder if it had been fixed.

The solution described above didn't work, and neither did both solutions in this thread (NotificationSubscriber and DW_extranet_error_uk) : http://developer.dynamicweb.com/forum/development/catch-wrong-login-with-notificationsubscriber.aspx

 

Thanks you !

 
Gaetan Di Caro
Reply

Oh well that didn't last long... Turns out my login form had some tag errors in it. Nevermind then :)

 

You must be logged in to post in the forum