CodeIgniter Forums
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)



Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-16-2012

[eluser]Ben Edmunds[/eluser]
rip_pit,

Please send a pull request for any additional translations that are needed. Thanks!


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-17-2012

[eluser]rei[/eluser]
Hi, I'm now trying to use Ion Auth but when I'm running the sql scripts of Ion auth to make tables on my database it shows me an error:

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTITY(1,1),
ip_address varbinary(16) NOT NULL,
username varchar(100) ' at line 2



How can I fix this? Nwei I'm using xampp server in windows 7 64-bit


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-17-2012

[eluser]rei[/eluser]
Hi, Its now working. I used the ion_auth.sql file Smile Nwei how can I make the username to be used as the identity for logging in instead of email address? Because I tried registering same username but different email address and it registers the account in the database but it adds a number at the end of the username. Like admin, admin1, admin2 etc... I want to make the username field unique and I want it to be used when logging in instead of the email address. Thanks in advance for ur replies/suggestions Smile


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-17-2012

[eluser]Ben Edmunds[/eluser]
Hey rei,

Just change the 'identity' config setting to 'username' in the ion_auth.php config file.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-17-2012

[eluser]rei[/eluser]
Thanks for your quick reply sir. It's now working Smile Your Ion Auth library is awesome Smile Thanks for your hard work in making this library, this will save me a lot of time Smile I just want to ask whats the "users_groups" table for??? Because I tried registering an account and it adds record in those tables but I dont know whats the use of that table. And can I add custom fields for registering an account? Like adding fields for address, cellphone number etc.. Please tell me if its provided by the library or I need to edit the source code of the library to suit my needs.


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-17-2012

[eluser]Ben Edmunds[/eluser]
Users are assigned to groups, the users_groups table holds those relations.

To add new data just add the fields to the users table and then you can pass it into the register() or update() methods.

Thanks!


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-17-2012

[eluser]rei[/eluser]
Wow. So I can really add custom fields without editing the source code of the Ion Auth library. Awesome! Thanks again sir Smile


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-17-2012

[eluser]Miguel Suárez[/eluser]
Hi, I have a problem, I cant seem to update the user's password from within a form:

This is the code I'm using, it updates the other fields fine:

Code:
$id = $this->input->post('userId');

$data = array(
'first_name' => $this->input->post('first_name'),
'last_name' => $this->input->post('last_name'),
'username' => $this->input->post('username'),
'password' => $this->input->post('password'),
'email' => $this->input->post('email')
);

$this->ion_auth->update($id, $data);

;

What am I doing wrong?


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-17-2012

[eluser]Ben Edmunds[/eluser]
Miguel Suárez,

That should work fine, any errors? if you do a var_dump($_POST); what do you get?


Ion Auth - Lightweight Auth System based on Redux Auth 2 - El Forum - 07-17-2012

[eluser]Miguel Suárez[/eluser]
Mmmm sorry my bad, wrong variable name, using "userPass1" instead of "password".

Funny how right after I post I find the solution.

Have to say, nice Auth system you have here, been using it for a day and its pretty complete!

Thanks for sharing