![]() |
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 - 11-25-2010 [eluser]JoeDRL[/eluser] Is it me or I can't find a way to retrieve a user by it's username...? I tried to use extra_where(array('username'=>$username)) followed by a get_user()but it sent me an error. Am I doing things right? Thanks a lot and very very good Auth system ![]() EDIT: Sorry, it worked after putting get_users() instead of get_user(). Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 11-26-2010 [eluser]Todlerone[/eluser] [quote author="techgnome" date="1290756490"]So then include the login form as part of your view. There's nothing that says the login form has to be it's own view. Just make sure the form posts to the right controller, and if it fails that it redirects to an appropriate page. -tg[/quote] TY techgnome for your reply. I tried this and I get Undefined variable: message, username and password. I have placed the auth controller index code into my home index controller and I copied the login function also. I also loaded the library('ion_auth'). Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 11-26-2010 [eluser]Timothy_[/eluser] [quote author="Ben Edmunds" date="1290508276"]Timothy_, I ran into this problem the other day as well. I just pushed a change to the library so the register() method will return the newly created users id if the registration was successful, otherwise it will return false. So an example of how you get the users id now is: Code: $user_id = $this->ion_auth->register(...... Hey Ben, Sorry about not getting back to you sooner, busy week! Thanks so much for doing this. This is perfect!!! Tim Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 11-29-2010 [eluser]Todlerone[/eluser] I tried putting the form in my main page view but I still get Undefined variable: message, username and password. I have placed the auth controller index code into my home index controller and I copied the login function also. I also loaded the library(‘ion_auth’). Ayone have suggestions.TY TY Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 11-29-2010 [eluser]techgnome[/eluser] What does your controller and form code look like? I don't know about others here, but I'm not clairvoyant. -tg Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 11-30-2010 [eluser]33cent[/eluser] Ben Edmunds, did you think about adding triggers into Ion Auth, something similar to Events in dx_auth? reference: http://dexcell.shinsengumiteam.com/dx_auth/general/events.html Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 11-30-2010 [eluser]Ben Edmunds[/eluser] 33cent, For the most part everything you do with Ion Auth is called by you in a controller so you should be able to add any hooks or triggers you want to in your controller code. Is there anywhere in particular that you need a trigger? Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 12-01-2010 [eluser]Todlerone[/eluser] [quote author="techgnome" date="1291062089"]What does your controller and form code look like? I don't know about others here, but I'm not clairvoyant. -tg[/quote] TY for your responce. I eventually worked it out. What I'm having a problem with now is the meta and user MySql tables. I have created a username column in the meta table but phpmyadmin won't let me set a foreign key index to the users table so that the username is passed. Code: CREATE TABLE IF NOT EXISTS `meta` ( Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 12-01-2010 [eluser]techgnome[/eluser] Don't use the username as the fkey... use the ID... which is already being set in your script there. -tg Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 12-01-2010 [eluser]Todlerone[/eluser] [quote author="techgnome" date="1291238848"]Don't use the username as the fkey... use the ID... which is already being set in your script there. -tg[/quote] Thanks again techgnome. I set the user_id to a foreign key. However when I create a new user the field still is left blank. Could I just add it to the additional data array? Code: $username = substr(strtolower($this->input->post('first_name')), 0, 1).strtolower($this->input->post('last_name')); |