Hi Friendz, I am using Login generator in my application. I need clarification: for ex: If a user login to the app. from one system. He shouldnot be allowed to login from another System at the same time. i.e Each User can login to the app. once at a time. can u Guys plz tell me , how to tackle this task. Advance Thx, Regards, Karthick. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
You could create a logged-in users table, log their user id an IP. Also their session ID? When users log in, check to make sure their user ID isn''t in the table, then write their connection to the table. When they log out, delete the entry. But what if they just disconnect and don''t log out? You''ll need to do some sort of housekeeping every so often on sessions/logged connections. I''ve not tackled this problem yet, but you''d probably have to do it from a cron job. I have several rails tasks that run only from cron and it works very well. Let me know what you come up with Jason Narayana Karthick wrote:> Hi Friendz, > > I am using Login generator in my application. > > I need clarification: > for ex: > > If a user login to the app. from one system. He shouldnot be allowed > to login from another System at the same time. i.e Each User can login > to the app. once at a time. can u Guys plz tell me , how to tackle this > task. > > Advance Thx, > Regards, > Karthick. > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Jason Norris wrote:> You could create a logged-in users table, log their user id an IP. Also > their session ID? > When users log in, check to make sure their user ID isn''t in the table, > then write their connection to the table. > When they log out, delete the entry. > But what if they just disconnect and don''t log out? You''ll need to do > some sort of housekeeping every so often on sessions/logged connections. > I''ve not tackled this problem yet, but you''d probably have to do it from > a cron job. I have several rails tasks that run only from cron and it > works very well. > Let me know what you come up with > > JasonHi Jason Norris, Thx for ur Logical mentor(useful for me). Can u Plz mail me /reply to this forum, some rails task that u are running from cron.(with explaination) Advance Thx Regards, Karthick. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
We use a class method call to send mass mailings every morning. Cron calls a shell script which does something like /home/rails/emailapplication/script/runner -e production ''Emailer.send_daily_announcements'' I haven''t done this using an ActionController method, but anything you want to run from a script should be able to run from a model. This was just hacked out by a couple of rails noobs, so if anyone has a better way to do it, I''d love to hear about it. Jason Narayana Karthick wrote:> Jason Norris wrote: > >> You could create a logged-in users table, log their user id an IP. Also >> their session ID? >> When users log in, check to make sure their user ID isn''t in the table, >> then write their connection to the table. >> When they log out, delete the entry. >> But what if they just disconnect and don''t log out? You''ll need to do >> some sort of housekeeping every so often on sessions/logged connections. >> I''ve not tackled this problem yet, but you''d probably have to do it from >> a cron job. I have several rails tasks that run only from cron and it >> works very well. >> Let me know what you come up with >> >> Jason >> > > > Hi Jason Norris, > > Thx for ur Logical mentor(useful for me). Can u Plz mail me /reply to > this forum, > some rails task that u are running from cron.(with explaination) > > Advance Thx > > Regards, > Karthick. > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---