close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Limit login attempts!?

Thread began 12/10/2011 2:22 am by steelace396915 | Last modified 12/15/2011 10:41 am by toms016390756 | 2079 views | 7 replies |

steelace396915

Limit login attempts!?

Hi

I wonder how to accomplish a limit login attempts feature when created all the standard security assist pages from the wizard? I have used the simple login/logout template. I have implemented the login functionallity in my start page (seperate sidebar div) and also included a logout button to redirect to the logout page in which I've included a clear all session behaviour and a redirect behaviour back to startpage. Ive included show region behaviours to startpage allowing the login box to show when users are not logged in and logout button to show when users are logged in. All this works! Ive tried a guuide from another thread to implement limited login attempts (Max logins) but I can't get it to work! I need a simple explanation how to accomplish this from where I am now according to description above!?

Sign in to reply to this post

Matthew Meling

Hey Steelace,

There are a few ways to do what you are asking, such as creating a session variable on the first failed login, and incrementing it by 1 with every failed login attempt. Then, when it reaches a certain number, it does what you want it to do.

If you need further assistance, please contact sales at 888-490-1545 if you're in the USA, or +1-858-768-6600 if you aren't to set up a premere ticket, and our engineers can help you implement the feature.

Thanks

Sign in to reply to this post

steelace396915

I have tried the guide Jason wrote under thread: showthread.php?p=85979

This does not work for me! I have checked carefully that that the session code is before the page access rule code.

I have enclosed the code for my login/logout page. I use swedish language in my site but that has nothing to do with the php code. Hope someone can help me with this problem.

/Martin J.

Attached Files
my code.txt
Sign in to reply to this post

Jason ByrnesWebAssist

the code to set the session and check the rule is after the authenticate user code on the page, it should be before the authenticate user code.

Sign in to reply to this post

steelace396915

Jason, I've tried to put the code in every possible place and still no success! I've enclosed a zipped php file with the code for that page if you would please take a closer look?

/Martin J.

Attached Files
mycode.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the code at lines 66 - 82:

php:
<?php

if (!session_id()) session_start();
if(!isset(
$_SESSION["loginCount"]))     {
  
$_SESSION["loginCount"] = "0";
}
?>
<?php
if (!session_id()) session_start();
if(isset(
$_POST["LogIn_submit"]))     {
  
$_SESSION["loginCount"] = "".$_SESSION['loginCount'] +1  ."";
}
?>
<?php
if (!WA_Auth_RulePasses("Max logins")){
    
WA_Auth_RestrictAccess("forgotpassword.php");
}
?>




needs to be moved to line 9 so that it is before the security assist authenticate user code.

Sign in to reply to this post

steelace396915

Thanks Jason! I tested some more after I wrote last post and suddenly cabooom it worked! I had done exactly what you told me here but I just succeeded by trial and error not really understanding fully why! ;=)

Sign in to reply to this post

toms016390756

Just made the change myself…worked beautifully!!!

THANKS!



Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...