Part of the EllisLab Network
   
3 of 51
3
FreakAuth light 1.1 released
Posted: 26 July 2007 01:57 PM   [ Ignore ]   [ # 21 ]  
Research Assistant
RankRankRank
Total Posts:  447
Joined  05-21-2007

Re-Hi guys,

maybe this question can seem weird, but i’ll ask smile

I love the CI philosophy it’s barely the ‘KISS’ one.

I’m learning a lot with your script, not like i’ll stole it from you but better it’s a damn good tutorial.

you choose to use db_session if i’m right, you choose to load it in the constructor. From the developper view, what make you choose to load it from the constructor and not from the autoload ?

I’ll love to get a reason, maybe i’m just trying to much to keep each library separate from library.

thanks !

 Signature 

-> None official irc channel [ irc.freenode.net #codeigniter ]

Profile
 
 
Posted: 26 July 2007 02:04 PM   [ Ignore ]   [ # 22 ]  
Grad Student
Rank
Total Posts:  40
Joined  06-27-2007

Hwo would one go about modifying Freak Auth 1.1 to allow login via username OR email, with one field.. so the login box would check input against the username field and the email field for a match.. ?

Profile
 
 
Posted: 26 July 2007 02:15 PM   [ Ignore ]   [ # 23 ]  
Research Assistant
RankRankRank
Total Posts:  447
Joined  05-21-2007

I forget to talk about this in the last post, but this is a suggestion tho.

Why not just include a simple switch language process and db_session (userdata) to select language right at login or switch later.

many thanks.

 Signature 

-> None official irc channel [ irc.freenode.net #codeigniter ]

Profile
 
 
Posted: 28 July 2007 03:02 AM   [ Ignore ]   [ # 24 ]  
Grad Student
Avatar
Rank
Total Posts:  93
Joined  06-05-2007

Hey guys thanks again for the awesome Auth library…anyways I just migrated my application from UserLib auth to FreakAuth_lite_1.1, I did everything right down to the letter(I hope so) and everything checked out ok. Except for one little thing…

The images, css, and JS won’t load when I type “installer” on my url.

I made sure the public and tmp folders are in my apps directory so I guess that’s been taken care of.

Freak Auth reports everything checks out ok From DB TABLES to Superadmin settings.

But I can’t see any captcha images, images, css or js. I’ve checked and rechecked areas of my application and checked my base_url if it’s right and I still can’t see any of the above…any suggestions?

P.S. I think tmp and public are writable cuz everytime I refresh the Freak Auth login page a new captcha image appears in the tmp folder…I just can’t see the darn thing hehe

 Signature 

Functional PHP Extension A set of higher-order functions and other primatives written in PHP (3/4 compatible) which let you write php code in a functional style, similar to the way you might in Haskell, Scheme, or ML.

Profile
 
 
Posted: 28 July 2007 03:46 AM   [ Ignore ]   [ # 25 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  515
Joined  12-05-2006

@pb30
yes it is possible to use the captcha in other stuff.

check out how we used it in FAL_front.php

$fields['security'] = $this->CI->lang->line('FAL_captcha_label');
$rules['security'] = $this->CI->config->item('FAL_user_captcha_field_validation');

......

$action='_login';
$this->CI->freakauth_light->captcha_init($action);
$data['captcha'] = $this->CI->config->item('FAL_captcha_image');


in your view

<p><label for="security"><?=$this->lang->line('FAL_captcha_label')?>:</label>
    
<?=form_input(array('name'=>'security',
                           
'id'=>'security',
                           
'maxlength'=>'45',
                           
'size'=>'45',
                           
'value'=>''))?>
    <?
=(isset($this->fal_validation) ? $this->fal_validation->{'security'.'_error'} : '')?>
    <?
=$this->load->view($this->config->item('FAL_captcha_img_tag_view'), null, true)?></p>

the captcha template is in views/FreakAuth_light/content/forms/html_for_captcha.php

Old captchas get deleted every time the freakauth_light->captcha_init() method is called

Alternatively you can do a mini-library just for captchas.
Also check ut this article: Not so useless! image_to_text() as a CAPTCHA


@jstrebel
About the custom userprofile tutorials: I’ll check it out their compatibility with FAL 1.1 asap.
did you try to use them with 1.1?

I’m planning to integrate them into next FAL release (not before September).

For the login with e-mail or username my suggestion (somebody already asked me this but I don’t remember were my answer is…) is to check the username string, check if an “@” is in it, if there is a “@” tell the system to check against the e-mail field, otherway against the classic username field.
I let you implement this using the new great extensibility feature of FAL 1.1

wink

 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: 28 July 2007 03:55 AM   [ Ignore ]   [ # 26 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  515
Joined  12-05-2006

@sikkle

you choose to use db_session if i’m right, you choose to load it in the constructor. From the developper view, what make you choose to load it from the constructor and not from the autoload ?

This choice has been done in order to make sure that in case somebody forgets, or changes the autoload in a second time, we always have db_session and FAL loaded together. Otherways FAL wouldn’t work.
It is not a mistake to autoload db_session in the autoload.

Why not just include a simple switch language process and db_session (userdata) to select language right at login or switch later.

Well this would be an extra feature that end users can implement.
You can use the db_session library to store whatever you like and need.
We didn’t implement multilanguage functionality for the following reasons:

- not everybody needs it and therefore it is an extra
- there are various ways to implement a multilanguage website, and therefore we live total freedomo to the developers to embrace their preferred one

@Jamongkad

Weird! Did somebody else encountered the same problem? basically you don’t see images at all.
Is your “base_url” right (including the end trailing slash?)

$config['base_url']    = "http://www.YOURDOMAIN.com/";


Have a nice weekend guys!

wink

 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: 28 July 2007 11:05 AM   [ Ignore ]   [ # 27 ]  
Grad Student
Avatar
Rank
Total Posts:  93
Joined  06-05-2007

@Jamongkad

Weird! Did somebody else encountered the same problem? basically you don’t see images at all.
Is your “base_url” right (including the end trailing slash?)

$config['base_url']    = "http://www.YOURDOMAIN.com/";


Have a nice weekend guys!

wink

Thanks you have a great weekend too!

$config['base_url']    = "http://127.0.0.1/yeventerbeta/";

This is my base url yup it includes trailing slashes. I’m scratchin my head over this one…quite a perplexing problem. Would the problem lie in the fact that I had to play with my .htaccess file? I did that in the first place when I did this

$config['index_page'] = "";

But I think the problem lies much deeper than this.

 Signature 

Functional PHP Extension A set of higher-order functions and other primatives written in PHP (3/4 compatible) which let you write php code in a functional style, similar to the way you might in Haskell, Scheme, or ML.

Profile
 
 
Posted: 29 July 2007 08:38 AM   [ Ignore ]   [ # 28 ]  
Summer Student
Avatar
Total Posts:  21
Joined  07-19-2007

I have short question about FreakAuth’s otutgoing mails. FreakAuth seems to automatically add “<” and “>” around the email address. This is ALSO done by CodeIgniter’s default email library. This gives me the following error:

SMTP server response: 554 5.7.1 Sender address format `<<webmaster@mysite.com>>’ not RFC-compliant

And just I can’t find where FreakAuth is adding this! Can anybody help?

Profile
 
 
Posted: 29 July 2007 09:08 AM   [ Ignore ]   [ # 29 ]  
Grad Student
Avatar
Rank
Total Posts:  99
Joined  03-23-2007

Hi guys

I think FreakAuth is an excellent addition to CodeIgniter and it saved me a lot of time. It’s really quite easy to install, use and adapt. What I didn’t achieve is to display the login form in my content div of one of my views. Is this possible? If I have a particular page that should be secured I want to show the login form on this page in the content div so that it shows the header, navigation and all. Now I just adapted the templates so that everything shows adapted to my design, except for the navigation. If it’s not possible, it’s not a big problem either. The backend of FreakAuth is also very useful and makes a good starting point for a cms backend.

So thanks a lot for your work. I donated 10 Euro, it’s not much but better than nothing.

Cheers
maesk

Profile
 
 
Posted: 29 July 2007 05:46 PM   [ Ignore ]   [ # 30 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  515
Joined  12-05-2006

@Jamongkad

If you use mode_rewrite you .htaccess file should look like the following

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond
$1 !^(index\.php|public|fonts|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

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
 
 
   
3 of 51
3
 
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 819, on March 11, 2010 11:15 AM
Total Registered Members: 119813 Total Logged-in Users: 40
Total Topics: 125952 Total Anonymous Users: 2
Total Replies: 662645 Total Guests: 455
Total Posts: 788597    
Members ( View Memberlist )