![]() |
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 - 05-11-2010 [eluser]Ben Edmunds[/eluser] Bernd, What do you think about putting the subject and stuff in the config file? Do you prefer the template? Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 05-11-2010 [eluser]joytopia[/eluser] Ben, I would much prefer the template. It is so comfortable to put text and functions in it. Or changing it from text to html for example. In our project we will have a lot of different emails in different languages, with personal infos for the user, like reminders etc. So I will put all of them into email templates, load lines from language files or text from database and so on. I think, sending emails from views is a good practise. Best regards Bernd Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 05-12-2010 [eluser]joytopia[/eluser] Ben, perhaps it would be a good idea to take the email out of the register (forgot password etc.) method and put it into a separate email method. This could be done in the controller, because sending emails has nothing to do with authentication. Now, instead of only returning bool, the registration method could return an array with relevant information like id, activation-code etc. The controller could look like this: Code: if($register = $this->ion_auth->register()) So the functionality, look and feel of the emails can be totally controlled by the programmer. What do you think? Best regards Bernd Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 05-12-2010 [eluser]Phil Sturgeon[/eluser] I'd rather not. The entire point of Ion Auth is that it's simple, lightweight and helps the programmer out. That complicates matters and makes the implementation a little lengthier. As far as "email has nothing to do with authentication" goes, sure it does. Perhaps we could have a register() and an insert_user() function, one does the whole shebang and the other just literally inserts the user. Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 05-12-2010 [eluser]joytopia[/eluser] Phil, a separate email-method could also be situated in the library file and accessed by the register-method. It would not be less lightweight. But it would give the programmer the possibility to design his emails without changing the library. Bernd Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 05-12-2010 [eluser]Phil Sturgeon[/eluser] I get that, it's just more hassle and involved current users of the library changing their applications for no real reason. Could you suggest a way to get the same functionality without buggering up the register() method? Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 05-12-2010 [eluser]joytopia[/eluser] append an additional parameter $send_email = TRUE Code: if($send_email) Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 05-12-2010 [eluser]Phil Sturgeon[/eluser] Thank's for suggesting an if statement, I only wish I had thought of that! Perhaps a config item could be added (defaulting to true) and if set to false it won't send emails. The true clause could contain the email code moved to its own method so it can be called separately. It's all on GitHub so fork and commit! Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 05-12-2010 [eluser]GlennJ[/eluser] Hi guys I've been looking at the code and I would like to implement Ion Auth twice on the same site. Now I can obviously do this via the config files so that one uses a "customers" table and another uses a "admin" table, but if I want both of them to use the "email" field as the identity won't they clash? Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 05-12-2010 [eluser]Ben Edmunds[/eluser] Glennj, Why not just use groups? |