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 - 03-23-2011 [eluser]rulin[/eluser] Hi Ben Just a quick question. I want to retrieve a list of groups so I can add a drop down list to the Create User view. I know I can get them with something like $this->ion_auth_model->get_groups(), but I seem to recall that you prefer if data was accessed via the library and not directly from the model. Any suggestions? I don’t want to start hacking the core library. Cheers Russ Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-23-2011 [eluser]dhaulagiri[/eluser] I cannot see register function in auth controller but there is in ion_auth library, how do i implement it ? Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-23-2011 [eluser]rulin[/eluser] [quote author="dhaulagiri" date="1300914182"]I cannot see register function in auth controller but there is in ion_auth library, how do i implement it ?[/quote] Hi dhaulagiri Look at function create_user() in the sample controller (auth.php), there is an example there. Code: if ($this->form_validation->run() == true && $this->ion_auth->register($username, $password, $email, $additional_data, $group)) Russ Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-23-2011 [eluser]Ben Edmunds[/eluser] Russ, You can use $this->ion_auth->get_groups(). The model methods are routed through the library. Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-23-2011 [eluser]rulin[/eluser] [quote author="Ben Edmunds" date="1300924011"]Russ, You can use $this->ion_auth->get_groups(). The model methods are routed through the library.[/quote] Thanks Ben Looked in ion_auth.php and couldn't see it... should have checked the user guide. Doh! Russ Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-23-2011 [eluser]Kevin Smith[/eluser] I'm writing a method to allow a user to update his/her email address, but I'd like to require them to enter their current password and have the application validate against that before updating the email address. Anyone have a best practice for how to do this? Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-23-2011 [eluser]dhaulagiri[/eluser] [quote author="rulin" date="1300918918"][quote author="dhaulagiri" date="1300914182"]I cannot see register function in auth controller but there is in ion_auth library, how do i implement it ?[/quote] Hi dhaulagiri Look at function create_user() in the sample controller (auth.php), there is an example there. Code: if ($this->form_validation->run() == true && $this->ion_auth->register($username, $password, $email, $additional_data, $group)) Russ[/quote] Do i need to create new function for user to register ? Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-24-2011 [eluser]rulin[/eluser] [quote author="dhaulagiri" date="1300949529"][quote author="rulin" date="1300918918"][quote author="dhaulagiri" date="1300914182"]I cannot see register function in auth controller but there is in ion_auth library, how do i implement it ?[/quote] Hi dhaulagiri Look at function create_user() in the sample controller (auth.php), there is an example there. Code: if ($this->form_validation->run() == true && $this->ion_auth->register($username, $password, $email, $additional_data, $group)) Russ[/quote] Do i need to create new function for user to register ?[/quote] If you mean you want a screen where users can register themselves, then yes. I don't think there is anything in Ben's demo code specifically for that. You can probably create something fairly easily based on the Create_user view. Russ Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-24-2011 [eluser]dhaulagiri[/eluser] i can see lots of people talking abt registration, hi ben can could u pls tell me, if i have to create register function in auth controller or it's already there somewhere ? Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 03-24-2011 [eluser]rulin[/eluser] [quote author="dhaulagiri" date="1300998990"]i can see lots of people talking abt registration, hi ben can could u pls tell me, if i have to create register function in auth controller or it's already there somewhere ?[/quote] If you go into /index.php/auth and log on with 'admin@admin.com' and 'password' it takes you into a user maintenance screen where you can register new users. Is this what you mean? Russ |