• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

One user login problem...

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi all,

I am developing one struts 2 application.
My problm is...
The user can log in only once...
I meant to say once the user is logged in.. he/she can't login again from any other computer.. .

How can I come to know this user has been alredy logged in... ?

Please help me....

Thanks you...
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, why would you want to do that.

Consider a scenario where the user logged in from home computer but forgot to logout.
Now, the same user comes to office and tries to login to your application, he is locked out now, because your application would not allow him to login.

Is this really what you want?

Perhaps, you should invalidate the previous login of the same user, if the user logs in again from some place else.
 
Sanket L Shah
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

James Ward wrote:Well, why would you want to do that.

Consider a scenario where the user logged in from home computer but forgot to logout.
Now, the same user comes to office and tries to login to your application, he is locked out now, because your application would not allow him to login.

Is this really what you want?

Perhaps, you should invalidate the previous login of the same user, if the user logs in again from some place else.



Thanks James...

but I am aware of this scenario.... but in yahoo mail the same thing happens.. while in google one user can login multipal times form anywhere.... I wanted to know how to keep common session so that I can know this user is alredy in session...
 
James Ward
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Keep the list of logged in users in database or in a static HashTable etc.

If same user logs in from multiple places, and you want to allow this, that user will get two different sessions.


 
Sanket L Shah
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks James....

Thank you so much...
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a little unsure whether you want to allow the same user to login from to different locations or not. If you want to allow it, then you don't need to do anything special for that...
 
Sanket L Shah
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

No i dont want use to login form another location...
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So check to see if they're logged in. If they are, don't allow them to log in again.
reply
    Bookmark Topic Watch Topic
  • New Topic