![]() |
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 - 06-12-2010 [eluser]Ben Edmunds[/eluser] dreamer111, Yes it does. Please post your ion_auth settings file and your meta schema. Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 06-12-2010 [eluser]dreamer111[/eluser] Thanks Ben Schema was taken directly from latest github file: benedmunds-CodeIgniter-Ion-Auth-235b81d.zip here is settings file: $config['tables']['groups'] = 'groups'; $config['tables']['users'] = 'users'; $config['tables']['meta'] = 'meta'; $config['site_title'] = "www.example.com"; $config['admin_email'] = "admin@admin.com"; $config['default_group'] = 'members'; $config['admin_group'] = 'admin'; $config['join'] = 'user_id'; $config['columns'] = array('first_name', 'last_name', 'company', 'phone'); $config['identity'] = 'email'; $config['min_password_length'] = 8; $config['max_password_length'] = 20; $config['email_activation'] = false; $config['remember_users'] = true; $config['user_expire'] = 7200; $config['user_extend_on_login'] = false; $config['email_templates'] = 'inserts/ionauthemails/'; $config['email_activate'] = 'activate.tpl.php'; $config['email_forgot_password'] = 'forgot_password.tpl.php'; $config['email_forgot_password_complete'] = 'new_password.tpl.php'; $config['salt_length'] = 10; $config['store_salt'] = false; $config['message_start_delimiter'] = '<p>'; $config['message_end_delimiter'] = '</p>'; $config['error_start_delimiter'] = '<p>'; $config['error_end_delimiter'] = '</p>'; Yep. it's weird. Everything seems to be correct to me. Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 06-12-2010 [eluser]dreamer111[/eluser] Ghmm. never mind. ![]() just got everything working. Not sure what was wrong though. Just replaced library/model and it worked. I get meta data now. Thanks for replies Ben. Turns out problem was with notepad++ dbgp plugin that I use for php edbugging. For some reason it was only showing part of the data. dunno how this is even possible. Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 06-12-2010 [eluser]InsiteFX[/eluser] Hi Ben, As I said above, some how the users are entering ( + - etc ) and other characters that should not be allowed in the email address. I'll I see if I can fix it and then post it here. Thanks Ben InsiteFX Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 06-13-2010 [eluser]Sinclair[/eluser] About the password generation... Code: public function salt() By default, what part of the code run? "return sha1($password . $salt);" or "return $salt . substr(sha1($salt . $password), 0, -10);" ? I'am struggling to get the password generation running in a Database procedure whitout success until now. Best Regards, Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 06-13-2010 [eluser]Sinclair[/eluser] Ok done with the password hashing in PostgreSQL. To hash passwords like this: Code: return $salt . substr(sha1($salt . $password), 0, -10); We need two functions in PlpgSQL: Code: CREATE OR REPLACE FUNCTION sha1(bytea) returns text AS $$ Code: CREATE OR REPLACE FUNCTION "public"."hash_password" (pPASSWORD varchar) RETURNS varchar AS Then we can call the HASH_PASSWORD function, just like: Code: select hash_password('123456789') Just in case that someone need to generate users in the database(PostgreSQL). Best Regards, Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 06-13-2010 [eluser]Ben Edmunds[/eluser] Thanks for posting the solution Sinclair Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 06-14-2010 [eluser]huuray[/eluser] how to check whether is user logged or not in view? Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 06-14-2010 [eluser]Ben Edmunds[/eluser] huuray, Some people make an auth helper that just returns ion_auth->logged_in() but I usually create a user object in a MY_Controller and pass that to every view. Then in the view I can just make sure the user object isn't empty. Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 06-14-2010 [eluser]huuray[/eluser] thanks ben, i think ion auth need a wiki ![]() |