Part of the EllisLab Network
   
17 of 53
17
FreakAuth light 1.1 released
Posted: 04 November 2007 05:58 PM   [ Ignore ]   [ # 161 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  103
Joined  12-05-2006

...you see FreakAuth never lies 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: 04 November 2007 06:45 PM   [ Ignore ]   [ # 162 ]  
Grad Student
Avatar
Rank
Total Posts:  64
Joined  01-21-2007

Dan,
  Question for you… I seen on your site before a tutorial of how to split auth.php controller across several controllers but cant find it now… would you have the link…

I need to seperate signup areas… one for employers and the other for users and was thinking of another way of working with one signup but would be easier to have two signup areas.

Thanks

Profile
 
 
Posted: 05 November 2007 03:19 PM   [ Ignore ]   [ # 163 ]  
Research Assistant
RankRankRank
Total Posts:  362
Joined  03-06-2007

I want to extend the validation class and I have added the function to MyFALVal. Do I have to load this and if so how to I call it.

I know the function works as I added to the fal_validation and it works as intended.

Thanks

 Signature 

EE: 2.4.0
nifootball.co.uk

Profile
 
 
Posted: 05 November 2007 05:09 PM   [ Ignore ]   [ # 164 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  103
Joined  12-05-2006
stb74 - 05 November 2007 08:19 PM

I want to extend the validation class and I have added the function to MyFALVal. Do I have to load this and if so how to I call it.

I know the function works as I added to the fal_validation and it works as intended.

Thanks

As I wrote in the tutorial Extending FreakAuth

In application/config/freakauth_light.php set:

$config['FAL_use_extensions'TRUE

and your MyFAL class will be loaded authomagically wink

You can the call your custom methods as you would normally do.

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: 05 November 2007 05:10 PM   [ Ignore ]   [ # 165 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  103
Joined  12-05-2006
3Beem.com - 04 November 2007 11:45 PM

Dan,
  Question for you… I seen on your site before a tutorial of how to split auth.php controller across several controllers but cant find it now… would you have the link…

I need to seperate signup areas… one for employers and the other for users and was thinking of another way of working with one signup but would be easier to have two signup areas.

Thanks

Have a look at this I don’t like that “auth.php” controller!

 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: 05 November 2007 05:16 PM   [ Ignore ]   [ # 166 ]  
Research Assistant
RankRankRank
Total Posts:  362
Joined  03-06-2007

Dan

I have enabled that, do I have to add anything into the MyFAL when I am adding a validation function.

 Signature 

EE: 2.4.0
nifootball.co.uk

Profile
 
 
Posted: 05 November 2007 05:18 PM   [ Ignore ]   [ # 167 ]  
Research Assistant
RankRankRank
Total Posts:  362
Joined  03-06-2007

Dan

I may be doing something really stupid here but as far as I can see I have followed your tutorial.

 Signature 

EE: 2.4.0
nifootball.co.uk

Profile
 
 
Posted: 06 November 2007 06:32 PM   [ Ignore ]   [ # 168 ]  
Research Assistant
RankRankRank
Total Posts:  362
Joined  03-06-2007

This is what I have done so far, hopefully someone can point out my mistake.

Edited config freakauth_light.php

$config[‘FAL_use_extensions’] = TRUE;

Renamed
libraries/MyFAL_demo.php to libraries/MyFAL.php
libraries/MyFALVal_demo.php to libraries/MyFALVal.php

Added validation function to MyFALVal.php for checking league names

function leaguename_backend_duplicate_check($value)
    
{
        
//checks if the request comes from add or edit actions
        
$fields='ID_LEAGUE';
        
$where= isset($_POST['ID_LEAGUE']) ? array('ID_LEAGUE !='=> $_POST['ID_LEAGUE']'league_name'=>$value) : array('league_name'=>$value);
        
$query $this->CI->leaguesmodel->getleagues($fields$limit=null$where);
        
       
        
//setting the right condition depending on registration type
        
if ($this->CI->config->item('FAL_register_direct'))
        
{
            $condition 
= (($query != null) && ($query->num_rows() > 0)) ?  TRUE FALSE;
        
}
        
else 
        
{
            $condition 
= (($query != null) && ($query->num_rows() > 0) OR ($query_temp != null) && ($query_temp->num_rows() > 0)) ? TRUE FALSE;
        
}
        
        
//checking if condition satisfied
        
if ($condition == TRUE)
        
{
            $this
->set_message('leaguename_backend_duplicate_check'$this->CI->lang->line('FAL_in_use_validation_message'));
            return 
false;
        
}
        
else
        
{
            
return true;
        
}
    } 

added validation check in my leagues controller.

//set validation rules
$rules['league_name''trim|required|xss_clean|leaguename_backend_duplicate_check'

The leaguename_backend_duplicate_check check doesn’t get used.

 Signature 

EE: 2.4.0
nifootball.co.uk

Profile
 
 
Posted: 07 November 2007 06:04 PM   [ Ignore ]   [ # 169 ]  
Research Assistant
RankRankRank
Total Posts:  362
Joined  03-06-2007

Is there no one that can help.

 Signature 

EE: 2.4.0
nifootball.co.uk

Profile
 
 
Posted: 07 November 2007 06:45 PM   [ Ignore ]   [ # 170 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  297
Joined  02-21-2007

Sorry, I didn’t experiment this facet of FAL, and I don’t have time to investigate. I know that Dan is very busy at the moment too. Please be patient…
Thanks.

Profile
 
 
   
17 of 53
17