Part of the EllisLab Network
   
4 of 25
4
FreakAuth light 1.0.4 released
Posted: 17 May 2007 09:22 AM   [ Ignore ]   [ # 31 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

Hey a&w,
cheers for the suggestions, and spelling supervision: given that I’m not an English native speaker, I need it!

Well about your requests, let’s start (more can be found on the usergiude: Session Class):

$config['sess_cookie_name']    = 'FreakAuth';//<- can be changed I set it to FreakAuth just to avoid other conflicting cookie names
$config['sess_expiration']     = 7200;
$config['sess_encrypt_cookie'] = TRUE; //<-- Whether to encrypt the session data stored in cookies
$config['sess_use_database']   = TRUE; // <-- needed because FAL (or better Db-session library) stores all session stuff into the database table ci_sessions
$config['sess_table_name']     = 'ci_sessions';
$config['sess_match_ip']       = FALSE;
$config['sess_match_useragent']= FALSE;//<-- if while checking the session against the cookie unique IDnumber we also check against the userBrowser stored in the session variable or not. FAL doesn't

FAL sends just 1 cookie to the user, containing the unique session ID identification number (the same stored in the ci_sessions -> session_id table). If I’m not wrong this cookie expires after 2 hours of user inactivity (this is controlled by the the variable $config[‘sess_expiration’]    = 7200;).

Well the DB table autoinstallation is planned for next release!
Stay tuned!

Dan

 Signature 

FreakAuth_light: pluggable & extendable authentication library that works on CI 1.5.X

CI SWIFT MAILER: 44% less memory than PHPMailer at double speed

Using Zend Framework components in Code Igniter

Profile
 
 
Posted: 17 May 2007 02:36 PM   [ Ignore ]   [ # 32 ]  
Summer Student
Total Posts:  24
Joined  10-19-2006

Thanks for the great work on 1.0.4.

I have installed 1.0.4 with a clean install of CI 1.5.3 and I am doing some testing.

Has anyone noticed a performance hit after installing Freakauth_light?

I just have the welcome controller and view. 

I DID NOT add any user checking (ie $this->freakauth_light->check(‘admin’) )

In the autoload.php file, Freakauth_light is autoloaded

$autoload['libraries'] = array('database', 'Freakauth_light');

When I load / refresh the welcome page, my “page rendered in” stats show between .1 and 2.4 seconds.

But if I remove Freakauth_light from being autoloaded

$autoload['libraries'] = array('database');

The “page rendered in” stats show mostly between .04 and .29 seconds (most of the time, it is under .1 seconds)

Quite a major difference.  Is anyone else seeing this?

Profile
 
 
Posted: 17 May 2007 03:06 PM   [ Ignore ]   [ # 33 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  277
Joined  02-07-2007

That would make sense to me. In Sentinel I didn’t autoload the library it was loaded through the controller on a per/need basis.

Also for those that are curious - I am rewriting the Sentinel library to be smaller, more efficient, and more abstract (no views or controller dependencies). When I get something worth sharing I will share it as its own thread (since the code base isn’t derived from F.A.L anymore).

Profile
 
 
Posted: 17 May 2007 04:29 PM   [ Ignore ]   [ # 34 ]  
Lab Assistant
RankRank
Total Posts:  192
Joined  04-03-2007
smalljohnson - 17 May 2007 02:36 PM

...
When I load / refresh the welcome page, my “page rendered in” stats show between .1 and 2.4 seconds.

But if I remove Freakauth_light from being autoloaded

$autoload['libraries'] = array('database');

The “page rendered in” stats show mostly between .04 and .29 seconds (most of the time, it is under .1 seconds)

Quite a major difference.  Is anyone else seeing this?


I was going to inquire along the same lines.  Have a look at my thread here.  I’m wondering what the performance comparisons are between the options I stated.  When you do an autoload of a configuration, CI actually loads the file twice.  I’m thinking autoload should almost just be for config files that do not have a corresponding library (because if there is a config file with a corresponding library it will be loaded anyway).

To take advantage of the configuration that CI finds without autoloading the controller’s constructor would just need to be prepped a little different (see the thread).  Maybe do a performance comparison between these methods and report your results?  This would be a standard situation for how to handle autoload of config files, not just within FAL (maybe?).

Profile
 
 
Posted: 17 May 2007 04:49 PM   [ Ignore ]   [ # 35 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  277
Joined  02-07-2007

I generally just use autoload for db_session, database and very heavily used helpers…

Profile
 
 
Posted: 18 May 2007 05:23 AM   [ Ignore ]   [ # 36 ]  
Grad Student
Rank
Total Posts:  51
Joined  09-12-2006

Question to the FAL team

Is there some change in the dbsession lib file since FAL 1.0.2?

As I alraidy use this dbsession lib in the reste of my application and that I have taken it into your FAL 1.0.2 distribution. I would like to know if you have made some change in it?

Thanks

Profile
 
 
Posted: 18 May 2007 06:02 AM   [ Ignore ]   [ # 37 ]  
Research Assistant
RankRankRank
Total Posts:  359
Joined  10-02-2006

Dan,

I think you found another anomly there; I was talking about the fal_front register() function and validation error handling for registration. Test: See what happens if you simply go to /auth/register in the sample views and submit the form with all the fields blank. I do not get a return on the user_name_error string. All other error strings are returned. I have looked through the code and tried to figure out why this is, but I am sorry to say that I have not figured it out, yet.

As for the custom and required fields, I tend to disagree with the approach. Values are either required or optional. If there are required values for an account, they need to be submitted with the initial creation of the account, at registration. To load a seperate form, or whatever, to assign more required values after username and password have been submitted makes no sense. If you truly require those values in the first place, how are you ever going to get them? By crippling the account until they are entered? Surely it is better then to require them in the first place as a condition to register. A user profile with entirely optional values is another matter. (How many people have filled out every field in the EE profile for this forum?) It is thus not a question of simple or advanced registration. It is a question of handling required or optional values.

 Signature 

CI version?
From SVN.

Profile
 
 
Posted: 18 May 2007 06:07 AM   [ Ignore ]   [ # 38 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006
thierryREY - 18 May 2007 05:23 AM

Question to the FAL team

Is there some change in the dbsession lib file since FAL 1.0.2?

As I alraidy use this dbsession lib in the reste of my application and that I have taken it into your FAL 1.0.2 distribution. I would like to know if you have made some change in it?

Thanks

No don’t warry!
Given that db_session is a third party library, we never touched it since the first release!

Dan

 Signature 

FreakAuth_light: pluggable & extendable authentication library that works on CI 1.5.X

CI SWIFT MAILER: 44% less memory than PHPMailer at double speed

Using Zend Framework components in Code Igniter

Profile
 
 
Posted: 18 May 2007 06:58 AM   [ Ignore ]   [ # 39 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

@smalljohnson
You might be right:in fact the Freak_auth.php library can just be loaded in the auth (or whatever you renamed it) controller
Nevertheless I didn’t notice souch a performance difference.
How did you run the test?
Did you use any script/custom software?

@Crimp
About username validation in auth/register
I tried but I got the right message leaving all fields blank “The User Name field is required.

about custom fields for registration
You right, the functionality to add some compulsory custom fields right in the first registration without much hacks would be nice.
I’ll try to implement it for next releases, leaving the option in the config to go for a simple registration or for a more detailed one.

 Signature 

FreakAuth_light: pluggable & extendable authentication library that works on CI 1.5.X

CI SWIFT MAILER: 44% less memory than PHPMailer at double speed

Using Zend Framework components in Code Igniter

Profile
 
 
Posted: 18 May 2007 07:52 AM   [ Ignore ]   [ # 40 ]  
Research Assistant
RankRankRank
Total Posts:  359
Joined  10-02-2006

Thanks for doing that test, Dan. At least I know I am alone wink

 Signature 

CI version?
From SVN.

Profile
 
 
   
4 of 25
4
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 64459 Total Logged-in Users: 27
Total Topics: 80973 Total Anonymous Users: 0
Total Replies: 435723 Total Guests: 226
Total Posts: 516696    
Members ( View Memberlist )