![]() |
Ion Auth - Lightweight Auth System based on Redux Auth 2 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Ion Auth - Lightweight Auth System based on Redux Auth 2 (/showthread.php?tid=27435) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 12-23-2010 [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 Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 12-23-2010 [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 ![]() $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. Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 12-23-2010 [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. Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 12-28-2010 [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) Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 12-31-2010 [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 Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 12-31-2010 [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 Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 12-31-2010 [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. Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 12-31-2010 [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); Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 12-31-2010 [eluser]AndrewTurner[/eluser] Is it possible for users to have membership in multiple groups? Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 01-01-2011 [eluser]Ben Edmunds[/eluser] AndrewTurner, Not yet but it is in the plans. |