• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to check 'Who is login' in forum using codeigniter

#1
[eluser]Unknown[/eluser]
Hello,

Will you please give me an idea, how to check 'Who is login' in forum using codeigniter.

Thanks

#2
[eluser]Dam1an[/eluser]
<rant>
You can't expect people on these forums to just give you answers like that... I (along with most other people here) am all too happy to help, but refuse to outright give you the answers until you can show you've at least made an attempt to approach the problem
</rant>

#3
[eluser]Thorpe Obazee[/eluser]
Yeap, irshad. You can at least show us the situation.

#4
[eluser]TheFuzzy0ne[/eluser]
You're best bet is to log a timestamp to the database every time a logged in user makes a request to your server. The find out who's logged in, you can look for timestamps that are less than say 10 minutes ago, and that should tell you who's logged in. Or, you can set the session to timeout after several hours, and check for timestamps that are less than the current time minus the max session time.

Sorry Dam1an, but the poor guy just wanted an idea, not a library that's been created for him. Tongue

#5
[eluser]Dam1an[/eluser]
@Fuzzy & irshad: Sorry, its just one of those days at work Sad

#6
[eluser]jdfwarrior[/eluser]
[quote author="Dam1an" date="1241540879"]@Fuzzy & irshad: Sorry, its just one of those days at work Sad[/quote]

No need to apologize, your 100% right.

#7
[eluser]Yorick Peterse[/eluser]
[quote author="jdfwarrior" date="1241545182"][quote author="Dam1an" date="1241540879"]@Fuzzy & irshad: Sorry, its just one of those days at work Sad[/quote]

No need to apologize, your 100% right.[/quote]

Ditto.

#8
[eluser]TheFuzzy0ne[/eluser]
[offtopic]
The last time I checked, this was a forum for helping people. If newcomers get ranted at for asking for suggestions, then this forum isn't much help, is it?

I can't see anything in the OPs original post that asks for it to be done for him. Instead he asks for an "idea". I've recently been looking for help with creating a forum, and I would have been totally lost without the ideas of others (especially Dam1an), and I would have been seriously annoyed if my request for help was met with mild hostility.

My idea might not even be the way to go, it's just what makes sense to me. In any case, it's not one of those things that can be solved by beating the user half-to-death with the user guide, so the answer might not be as obvious to them as it is to you.
[/offtopic]

Back on topic again - it looks like the CodeIgniter session class updates the timestamp for the users last activity, so perhaps you could use the session class and extend the session class and get the information you're looking for?

#9
[eluser]Dam1an[/eluser]
I guess part of the reason I went straight into a rant, was because its something that seemed so obvious to me (I've been working with similar stuff lately) so it initially seemed to me that irshad hadn't even given it any thought (but maybe he had, and it just never occured to him)

My idea was also to just have a recent_activity field in the database, and update this with every request, and then return all the ones within the last X minutes for current users

Anyway, enough with if I was right/wrong to have a "rant"... End of
<joke>(and if you carry on with this rant business, I'll rant at you Tongue)</joke>

#10
[eluser]TheFuzzy0ne[/eluser]
[quote author="Dam1an" date="1241551865"]<joke>(and if you carry on with this rant business, I'll rant at you Tongue)</joke>[/quote]

...And I shall beat you with the user guide. Big Grin


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.