EllisLab text mark
Advanced Search
7 of 17
7
   
flexi auth - A user authentication 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
159 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?

 
Posted: 12 November 2012 05:31 AM   [ Ignore ]   [ # 106 ]   [ Rating: 0 ]
Joined: 2012-03-08
159 posts

@Kamahl
Thanks for the feedback, I would have loved to include 3rd party authentication api’s with the library but I sadly don’t have the time in the foreseeable future to implement it.

Coding the library, the demo and then writing the documentation takes up a lot of unpaid hours.
However, if someone else ever wants to jump in a give it a go, I am willing to lend a hand where and when I can help.

@ekstrakt
I realise having to define the $this->auth variable before loading the library is cumbersome and messy.
It was never intended to be done that way until a serious bug late in development of the library when using PHP 5.4 forced me to define the var before the library is loaded. Originally it was defined within the lite library model, but with PHP 5.4 the var could no longer be accessed by other library files.
If you reckon you know a better way of doing this within the library files themselves - please let me know!

As you already sussed out yourself, the only way to auto load the library is via extending CI’s controllers - which to be honest - is something I do In nearly all of my own projects, so personally I don’t find it a problem.

Regarding using the library with HMVC, I’m afraid I haven’t tried using them together so cannot help on that matter.

For anyone looking for info on how to implement this, read up at the following:
http://ellislab.com/codeigniter/user-guide/general/core_classes.html
https://github.com/jamierumbelow/codeigniter-base-controller
http://www.highermedia.com/articles/nuts_bolts/codeigniter_base_classes_revisited

 Signature 

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

 
Posted: 19 November 2012 11:26 AM   [ Ignore ]   [ # 107 ]   [ Rating: 0 ]
Joined: 2012-11-19
1 posts

Great library… grin

But, unless I’m missing something, I can’t see how you create your first admin user?

 
Posted: 20 November 2012 05:20 AM   [ Ignore ]   [ # 108 ]   [ Rating: 0 ]
Joined: 2012-03-08
159 posts

@Andy

If you are looking to just get started, then the easiest way to create your first admin user would be to copy the demo admin user from the SQL dump file included with the demo.

The login details for the main admin user within the demo is as follows:
Email: .(JavaScript must be enabled to view this email address)
Username: admin
Password: password123

Alternatively, you could create a form that would submit your admin users details and then create an account for them using the insert_user() function.
When calling the function, you would then define that the admin belongs to an admin group via the ‘group_id’ function argument.

I hope that helps you out.

 Signature 

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

 
Posted: 22 November 2012 05:20 AM   [ Ignore ]   [ # 109 ]   [ Rating: 0 ]
Joined: 2012-11-22
8 posts

Great library @haseydesign

I am trying to create my own controller but it seems not working at localhost but working at server.Even login errors (flashdata) not seems working at localhost.Seems not related with library but if anyone have idea about it share with me please.

Thanks.

 
Posted: 22 November 2012 06:47 AM   [ Ignore ]   [ # 110 ]   [ Rating: 0 ]
Joined: 2012-03-08
159 posts

Hey xuma,
Glad you’re liking the library.

You’ve not really posted enough information for me to diagnose what the problem is, although from you saying that flashdata isn’t even working, then you may have a config error with sessions.

Ensure that the following setting is defined via your CI config file (application/config/config.php)

$config['sess_use_database'TRUE

And then ensure that you have inserted the CI session table correctly to your database (Available via the included sql dump file).

Other than that, the best way to diagnose the problem is to install the demo has instructed via http://haseydesign.com/flexi-auth/user_guide/installation.
If the demo works, then you know you have a problem with your custom setup. In which case try and compare the differences between your controllers and config files.

Good luck.

 Signature 

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

 
Posted: 22 November 2012 07:25 AM   [ Ignore ]   [ # 111 ]   [ Rating: 0 ]
Joined: 2012-11-22
8 posts

Hey haseydesign ,

Thanks for your reply , it seems

$config['sess_use_database']TRUE

main problem.When it is true im getting error and seems when i follow flexi_cart installation guide i setted true.

Thanks again.

 
Posted: 26 November 2012 10:01 PM   [ Ignore ]   [ # 112 ]   [ Rating: 0 ]
Joined: 2011-08-25
6 posts

I just did a fresh CI install with Flexi Auth and tried to setup the Demo version via the Installation Guide, but when I go to my site (I’m setting it up on a live site), all I’m getting is the following error:

An Error Was Encountered
Unable to load the requested class: flexi_auth_lite

I’ve gone over the installation guide 10 times now and I’m quite sure I’ve done everything right. Any help would be greatly appreciated! Thanks!

 
Posted: 27 November 2012 07:43 AM   [ Ignore ]   [ # 113 ]   [ Rating: 0 ]
Joined: 2012-03-08
159 posts

@pinmouse

If you Google ‘Unable to load the requested class’ you will get a lot of returned results specifically related to CodeIgniter that may be able to help you track down the problem.

From what I can see as the general cause is that it may be something to do with the letter casing of some of the library or model files.
Other than that, trying to autoload the library (Which is not currently possible with flexi auth) seems to return the same error.

Have you renamed any of the library files?
Are you loading the library similar to the following method?

$this->auth = new stdClass;
$this->load->library('flexi_auth'); 
 Signature 

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

 
Posted: 27 November 2012 10:51 AM   [ Ignore ]   [ # 114 ]   [ Rating: 0 ]
Joined: 2011-08-25
6 posts
haseydesign - 27 November 2012 07:43 AM

Have you renamed any of the library files?
Are you loading the library similar to the following method?

$this->auth = new stdClass;
$this->load->library('flexi_auth'); 

No I haven’t renamed anything, this is a totally fresh install of the demo, just as it is instructed. I’m not loading any library, just uploading the demo files and going to my URL.

 
Posted: 28 November 2012 10:56 PM   [ Ignore ]   [ # 115 ]   [ Rating: 0 ]
Joined: 2010-08-09
2 posts
pinmouse - 27 November 2012 10:51 AM
haseydesign - 27 November 2012 07:43 AM

Have you renamed any of the library files?
Are you loading the library similar to the following method?

$this->auth = new stdClass;
$this->load->library('flexi_auth'); 


Basically mate you have to combine the demo files and the library files in order to work.

The demo is working like a charm, and the documentation is superb!!!

 

 
7 of 17
7