CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 How to restrict valid users during login

Print topic Send  topic

Author Message
jacem

Posts: 87
Posted: 06/04/2007, 10:48 PM

If you want to restrict the login of a user without removing the user from your 'valid users' table you can not simply alter the WHERE clause in the login form properties.

What you have to do is modify the SELECT statement in the CCLoginUser in your Common script to exclude users according to your criteria.

For example if your table of valid users had a boolen type field named 'suspended' (1=suspended, 0=unsuspended) then you would need to modify the Select statement for the CCLoginUser function in the Common script to add the text

. " AND Suspended=0"

Thanks to the CC guys for the genesis of this tip when they were answering another users question on blocking concurrent logins from the same user.
View profile  Send private message
Damian Hupfeld
Posted: 06/04/2007, 11:10 PM

Alternatively set the the minimum access-level or group to something above 1
and you can reserve 0 or 1 for suspended
eg.
1 - Suspended
5 - Awaiting authorisation
10 - Member
20 - Editor
30 - Admin

You then do not need to modify the login form manually at all - just set the
Security Level to 10 for your Restricted pages as you create them.

Damian



"jacem" <jacem@forum.codecharge> wrote in message
news:254664f91b9e93c@news.codecharge.com...
> If you want to restrict the login of a user without removing the user from
> your
> 'valid users' table you can not simply alter the WHERE clause in the login
> form
> properties.
>
> What you have to do is modify the SELECT statement in the CCLoginUser in
> your
> Common script to exclude users according to your criteria.
>
> For example if your table of valid users had a boolen type field named
> 'suspended' (1=suspended, 0=unsuspended) then you would need to modify the
> Select statement for the CCLoginUser function in the Common script to add
> the
> text
>
> . " AND Suspended=0"
>
> Thanks to the CC guys for the genesis of this tip when they were answering
> another users question on blocking concurrent logins from the same user.
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>


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.

MS Access to Web

Convert MS Access to Web.
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.