CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 restrict attempts at login

Print topic Send  topic

Author Message
kbwill

Posts: 20
Posted: 10/06/2005, 1:21 PM

I am new to CodeCharge Studio 2.3.2

I have searched the forums, and help menus for a way to
limit the number of attempts to do a successful login.

Can y'all help me out?

I want to make it so a user tries to login in three times
and then is redirected to an access_denied page.
_________________
Learning CentOS, CCS3.2,
some assembly may be required.
View profile  Send private message
DonB
Posted: 10/06/2005, 6:16 PM

Generally, I'd approach this by augmenting the On Click event on the normal
'logon' button. Add code to update the user table (a new field) that holds
the maximum failure count. Each time they login successfully, write '3' to
it, each time they fail, subtract one (that is, "UPDATE users set failcount
= failcount - 1 WHERE user_login = 'loginname'").

If ever they try to login and the count is zero, redirect to the 'fail'
page.

--
DonB

http://www.gotodon.com/ccbth


"kbwill" <kbwill@forum.codecharge> wrote in message
news:24345872fbe428@news.codecharge.com...
> I am new to CodeCharge Studio 2.3.2
>
> I have searched the forums, and help menus for a way to
> limit the number of attempts to do a successful login.
>
> Can y'all help me out?
>
> I want to make it so a user tries to login in three times
> and then is redirected to an access_denied page.
> _________________
> chazaq = "Be strong and of good courage"
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

kbwill

Posts: 20
Posted: 10/07/2005, 4:41 AM

Thanks DonB, I will try that and let you know how it goes.

I have not written any PHP code into my CCS app yet but I will be experimenting with PHP after I get the login the way I want.
Thanks again!
_________________
Learning CentOS, CCS3.2,
some assembly may be required.
View profile  Send private message
Benjamin Krajmalnik
Posted: 10/07/2005, 7:17 AM

Or use a session variable to keep the login count.
This has the downside that you could open multiple broser instances, but
with your method additional code is needed to ensure you do not lock out a
user permanently. The original post did not mention additional design
specs, but I would probably add a datetimne field and use a self clearing
function - otherwise it could become a mainenance nightmare.

kbwill

Posts: 20
Posted: 10/07/2005, 7:30 AM

Hmmm. Good point, Benjamin.

Does CCS 2.3 have a place I can make the session variable or
should make the change in my PHP.ini file and let php manage the session?
_________________
Learning CentOS, CCS3.2,
some assembly may be required.
View profile  Send private message
peterr


Posts: 5971
Posted: 10/07/2005, 11:06 AM

It would be the same place as above, the "On Click" event of the Login button. That's where the login code resides and you can adapt it to work little differently. I don't have an example handy, but hopefully someone else will expand on that if you still need help.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
kbwill

Posts: 20
Posted: 10/07/2005, 12:39 PM

Thanks peterr,

I suppose I could insert a PHP counter in the custom code area provided by CCS.
I can right-click on the "On-Click" event and a short-cut menu pops up and a "code" page
appears on my lower half of my screen. This is where I can insert a PHP failure counter code, right? or am I making this harder than I need to?

I hope someone does have an example.
If not, when I get it working I will post it. I am certain someone could benefit.
_________________
Learning CentOS, CCS3.2,
some assembly may be required.
View profile  Send private message
feha


Posts: 712
Posted: 10/12/2005, 12:46 PM

You coud do as Don suggested ...
You can add timestamp and reset to ZERO (0) all attemptes after example 24 hours ...
This way you will not lockout users forever ...
_________________
Regards
feha

www.vision.to
feedpixel.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.