EllisLab text mark
Advanced Search
7 of 17
7
   
flexi auth - A user authentication library for CodeIgniter
Posted: 30 October 2012 09:48 PM   [ Ignore ]   [ # 91 ]   [ Rating: 0 ]
Joined: 2011-05-10
7 posts

Hi,

Thanks for the quick reply.

I’m adding user role selection after login and will be needing more guidance.

 Signature 

RT

 
Posted: 31 October 2012 09:00 AM   [ Ignore ]   [ # 92 ]   [ Rating: 0 ]
Joined: 2009-09-17
9 posts

First of all, thanks for this, looks very promising.

First thing I did was change the config to suit my mysql table name conventions, which is to always use “id” as the id column, not prefixed in anyway way…

Anyway, so I do

$this->flexi_auth->insert_user('username@gmail.com''''password', array(), FALSETRUE); 

to get a username in and got the following error:

Error Number1052

Column 
'id' in where clause is ambiguous

SELECT 
`email`, `activation_tokenFROM (`user_accounts`) LEFT JOIN `user_groupsON `user_accounts`.`group_id` = `user_groups`.`idWHERE `id` = 4 GROUP BY `id`

Filename: /home/supplementdb.co.uk/htdocs/dev/models/flexi_auth_lite_model.php

Line Number
163 

Looks like your query is not specifying the table name in the group by clause.

Anyway simple fix on flexi_auth_lite_model.php line: #152

$this->db->group_by(.$this->auth->tbl_col_user_account['id']); 

to

$this->db->group_by($this->auth->tbl_user_account.'.'.$this->auth->tbl_col_user_account['id']); 
 
Posted: 31 October 2012 09:04 AM   [ Ignore ]   [ # 93 ]   [ Rating: 0 ]
Joined: 2009-09-17
9 posts

Actually it seems I’m having that issue with most of the queries. If you are going to give the ability to change the columns in the config file then the queries should really include table names to avoid the problem of ambiguous columns.

 
Posted: 31 October 2012 06:21 PM   [ Ignore ]   [ # 94 ]   [ Rating: 0 ]
Joined: 2012-03-08
158 posts

@AJReading

You make a very valid point, I’ll look into updating the library ASAP.
Thanks

 Signature 

flexi-auth | A user authentication library for CodeIgniter.
flexi-cart | An e-commerce shopping cart library for CodeIgniter.

 
Posted: 01 November 2012 04:37 AM   [ Ignore ]   [ # 95 ]   [ Rating: 0 ]
Joined: 2012-09-25
1 posts

Question : I am using your product and everything works fine. Accept..

I have a grid (Wijmo) that calls a controller to get the data.
In the constructor of the controller I have this code.

if (!$this->input->is_ajax_request()) {
  if (! $this->flexi_auth->is_logged_in())
  {
  // Set a custom error message.
    $this->flexi_auth->set_error_message(‘You must login to access your climate zones.’, TRUE);
    $this->session->set_flashdata(‘message’, $this->flexi_auth->get_messages());
    redirect(‘auth’);
  }
  }

Data is received. But after that I am automatically logged out…

What am I doing wrong ?

 

 
Posted: 01 November 2012 05:34 AM   [ Ignore ]   [ # 96 ]   [ Rating: 0 ]
Joined: 2012-03-08
158 posts

@RaoulHuisman

It’s not possible for me to know the exact problem your having with the code snippet that you have posted.

All that code is doing is checking that the page was not loaded via ajax and that the user is not logged in. In which case it sets an error message to CI’s session flash data and redirects to the controller auth. I’m presuming you already knew all that - but that’s all I’ve got to go on.

The problem is most likely a configuration problem, maybe from your installation of the library, or something directly within your controller.
To confirm whether its your config, try installing the demo, if it works correctly you can be sure its a problem within your setup.

I would suggest to debug the problem you could create a new CI installation, run through the flexi auth installation guide - line by line -  and then try and create a minimalist version of the page you are trying to create now.
Once this is working, then compare it will your current effort and find out what does not match up.

 Signature 

flexi-auth | A user authentication library for CodeIgniter.
flexi-cart | An e-commerce shopping cart library for CodeIgniter.

 
Posted: 01 November 2012 05:40 AM   [ Ignore ]   [ # 97 ]   [ Rating: 0 ]
Joined: 2009-09-17
9 posts

haseydesign: thanks, I did start this myself but I’m sure it’s a quicker and easier job for you being more familiar with the code. Any chance of a reply on here when you’ve done it? Keen to start using it wink. Cheers

 
Posted: 02 November 2012 08:54 AM   [ Ignore ]   [ # 98 ]   [ Rating: 0 ]
Joined: 2012-11-02
2 posts

Flexi auth library for codeigniter has been very useful, but I have a problem,

After login, it flashes “Login Successful” message but does not redirect to the backend as set, instead, it redirects to the login page.

I think something is killing the session as soon as it is set…please what could be the cause of this

 
Posted: 03 November 2012 02:51 AM   [ Ignore ]   [ # 99 ]   [ Rating: 0 ]
Joined: 2012-03-08
158 posts

@AJReading

I’ve updated the flexi auth library so that all SQL statements now use column names prefixed with table names.

This was a large update in terms of the amount of code that had to be updated, so whilst I have tested the library via the demo examples, there could be a bug or two that may have been introduced with the update. So if something is misbehaving, let us know and I’ll check it out.

The update is available via the Github repo. The only files that need updating are the model and library files.

 Signature 

flexi-auth | A user authentication library for CodeIgniter.
flexi-cart | An e-commerce shopping cart library for CodeIgniter.

 
Posted: 03 November 2012 02:56 AM   [ Ignore ]   [ # 100 ]   [ Rating: 0 ]
Joined: 2012-03-08
158 posts

@chibuzor

I would suggest you try the basic library demo that I have posted previously @ http://ellislab.com/forums/viewreply/1037586/

If you can get this to work, then you know that your general setup and installation of the library is working okay, and that there is probably an error within your controller/model setup.

If this example doesn’t work, then it suggests there is a problem with your installation of the library. In which case you will need to go through the installation guide - step by step (Its important everything is read through).

 Signature 

flexi-auth | A user authentication library for CodeIgniter.
flexi-cart | An e-commerce shopping cart library for CodeIgniter.

 
Posted: 05 November 2012 08:23 AM   [ Ignore ]   [ # 101 ]   [ Rating: 0 ]
Joined: 2009-09-17
9 posts
haseydesign - 03 November 2012 02:51 AM

@AJReading

I’ve updated the flexi auth library so that all SQL statements now use column names prefixed with table names.

Thanks for that and the priv message! I will test it out and feed back any issues I encounter. I’m not surprised it was a significant task, I found it quite a task when I started doing it myself. Glad I left it to you however wink

 
Posted: 06 November 2012 01:11 PM   [ Ignore ]   [ # 102 ]   [ Rating: 0 ]
Joined: 2012-10-19
11 posts

@haseydesign

I’m back with the same problem. I have been lots of test to know what is happen, why is logged out a user in chrome?.

Your demo worked fine in the server.

I’ve opened a thread here if you want to see more about this “thing”:
http://ellislab.com/forums/viewthread/229267/


Best.

 
Posted: 07 November 2012 05:41 AM   [ Ignore ]   [ # 103 ]   [ Rating: 0 ]
Joined: 2012-03-08
158 posts

@davidinchi

I’ve posted you a couple of ideas over on your other thread.
Good luck with it!

 Signature 

flexi-auth | A user authentication library for CodeIgniter.
flexi-cart | An e-commerce shopping cart library for CodeIgniter.

 
Posted: 09 November 2012 09:15 AM   [ Ignore ]   [ # 104 ]   [ Rating: 0 ]
Joined: 2012-06-03
2 posts

Hi,

I have tested several Auth libraries but I must say this is the best. Thank you.

Do you plan to add 3rd-party APIs (at least FB, maybe Google)? I think it would make this library even more epic.

 
Posted: 09 November 2012 11:52 AM   [ Ignore ]   [ # 105 ]   [ Rating: 0 ]
Joined: 2012-11-09
1 posts

Any idea how to autoload the library?
I was playing around with it, but I see from the included demo (I couldn’t find any other info, nor documentation) that a $this->auth needs to be created before using the flexi_auth library, which, to my opinion, is a bit cumbersome.
And I don’t want/need to extend the core controller just for that one property.

P.S.
Perhaps a more detailed documentation and usage examples will be better, because at this moment (without looking at the source) I can only see the demo, which explains the features this lib offers, but no reference on how to use them.


————UPDATE————-
I extended the core controller, to create the $this->auth variable, and all was working fine.
Now, does anyone have idea how to make this library work with the HMVC extension?

 
7 of 17
7