Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 9th, 2006, 04:38 AM
Authorized User
 
Join Date: Mar 2006
Location: Doha, , Qatar.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Inactivate User Account

Inactivate User Account

If a user is already logged in and the administrator closed or inactivate his account
and the user clicked on a button, he will get an error message.

so, is there away to prevent the administrator from inactivating users accounts while
they are loggedin?

Nina

Happy Programming :)
__________________
Happy Programming :)
  #2 (permalink)  
Old March 10th, 2006, 11:43 PM
Authorized User
 
Join Date: Mar 2006
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In the user db make a field like 'inactivate' or 'close' and set that value to true when the administrator inactivate or close user's account. In your login method/module check for the value 'inactivate' or 'close' and if it is 'true' don't let the user login, you can also display a proper error message based on the values set.

Regards,
Puli.
  #3 (permalink)  
Old March 12th, 2006, 12:55 AM
Authorized User
 
Join Date: Mar 2006
Location: Doha, , Qatar.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

okay how can i disable the inactive button for the logged in user.. i mean can i write a code that checks who is logged in and who is not? and how?

Happy Programming :)
  #4 (permalink)  
Old March 12th, 2006, 01:14 AM
Authorized User
 
Join Date: Mar 2006
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sure you can. but I need a little detail about how you login the user, I mean are you using session variables or updating databse on login or using cookies etc.

Regards,
Puli
  #5 (permalink)  
Old March 12th, 2006, 05:59 AM
Authorized User
 
Join Date: Mar 2006
Location: Doha, , Qatar.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

am using session variable to store username..

Happy Programming :)
  #6 (permalink)  
Old March 13th, 2006, 10:13 AM
Authorized User
 
Join Date: Mar 2006
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Since you can't read the session variable of the client, you have to go with the method I mentioned. Let the admin inactivte the user, and store the decision in a column and check for it on the next login. The other option is to write the login information to session variable as well as a database table which can be accessed by both admin and client. To record logout, on events logout click or session_end (available in Global.asax.{vb/cs} of your application) update the info in database as logout. This way you can check if the user is logged in or not by looking up the database.

I hope this will work for you.
Regards,
Sai Puli
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 15 -create user account melania BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 15 December 5th, 2008 05:53 PM
TO retrieive all user account name vinothsiva General .NET 1 June 15th, 2007 05:29 PM
How to creat an user account prad_a PHP Databases 1 May 12th, 2007 03:25 AM
Create User Account casselj ASP.NET 1.0 and 1.1 Professional 1 June 20th, 2005 08:34 AM
creating new user(object name) for IIS account joshil Access ASP 1 April 18th, 2004 01:43 PM



All times are GMT -4. The time now is 07:51 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.