Ion Auth - Lightweight Auth System based on Redux Auth 2 |
[eluser]kikz4life[/eluser]
@chenda have u tried creating new user then login using it? im experiencing a problem when doing this. Hoping to hear your reply soon. thanks
[eluser]ci_lover[/eluser]
A solution for retrieving online users: Say I want to keep users logged in for 60 minutes (3600 secs): 1- In global config.php (config/config.php): set the user session to last for 3600 secs: $config['sess_expiration'] = 3600; 2- I then query the "users" table like this (using active record): function get_online_users(){ $date = date("Y-m-d H:i", time()); $users = $this->db ->where("TIMESTAMPDIFF(SECOND, FROM_UNIXTIME(last_login), '$date') < 3600") ->get('users'); return $users->result_array(); } This will return the users who logged-in in the last hour, and so, are considered online, problem solved Hope this helps someone.
[eluser]Thinkers[/eluser]
Hello Ben, hello everybody. I am creating my very first application with codeigniter and i am using this library for the simplicity and the power it has. Actually my login/register/forgot email procedures are protected by capthcas, and is good enough from the security side. But I know that captchas are really user-unfriendly and i like to get rid of them, so i was wondering if is there a method to prevent a flood of request to the module or is it planned at any stage in the library, or if someone know a method to present a captcha after x failure attempts. Anyone has already implemented one of these solutions? Thank you all.
[eluser]33cent[/eluser]
Hi, i need one feature: emailing account info upon registration (example: accounts are created by admin, and users receive their login informations on email)
[eluser]Mantra of Doom[/eluser]
Hi, I have more of a general question. I need to fetch a user's data by the username. I get that I need to use get_user($id) to get the user data array, but I'm having trouble getting the id. I know I'm making a simple mistake, but I'm still not sure where. Any help would be appreciated. Code: function get_player($username){ this is the error I'm getting Code: A PHP Error was encountered
[eluser]pickupman[/eluser]
I am guessing you are passing a blank $id. The query statement is breaking because it should not be users.id = LIMIT 1
[eluser]Mantra of Doom[/eluser]
Pickupman: Yes, after looking at it again, I am passing a blank id. What I'm trying to do is at the user list, make the username a link to the user's profile. The url should look like www.site.com/player/view/username What would the best way to do this? Here is my controller: Code: // Show Player List Code: // Gets a player's data for profile page Player List view prints the user data into a table: Code: <h3>All Players</h3> I haven't posted the player profile view because the above code never loads the profile page to begin with. I've been scratching my head over this for a week. Ion Auth is the easiest (for a beginner like me) auth library I've tried so far, and if I can get this profile page working, I'll be all set to finish my project.
[eluser]pickupman[/eluser]
You could add this to ion_model.php Code: /** Then when you are iterating results for your links, you could use something like: Code: $this->ion_auth->get_user_by_field('username',$username); Passing a parameter to your method and using the code below is redundant. It won't break, but it's doing the same thing: Code: $data['username'] = $this->uri->segment(3);
[eluser]AndrewTurner[/eluser]
Is it possible for users to have membership in multiple groups?
[eluser]Ben Edmunds[/eluser]
AndrewTurner, Not yet but it is in the plans. |
Welcome Guest, Not a member yet? Register Sign In |