Part of the EllisLab Network
   
17 of 51
17
FreakAuth light 1.1 released
Posted: 04 November 2007 04:58 PM   [ Ignore ]   [ # 161 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  515
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 05:45 PM   [ Ignore ]   [ # 162 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  155
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 02:19 PM   [ Ignore ]   [ # 163 ]  
Lab Assistant
RankRank
Total Posts:  261
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 

EE2: 2.0.1 Beta - Build: 20100215
MSM: 2.0 - Build: 20100215
EE2 Forum: 3.0.1 - Build: 20100215
nifootball.co.uk

Profile
 
 
Posted: 05 November 2007 04:09 PM   [ Ignore ]   [ # 164 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  515
Joined  12-05-2006
stb74 - 05 November 2007 02: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 04:10 PM   [ Ignore ]   [ # 165 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  515
Joined  12-05-2006
3Beem.com - 04 November 2007 05: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 04:16 PM   [ Ignore ]   [ # 166 ]  
Lab Assistant
RankRank
Total Posts:  261
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 

EE2: 2.0.1 Beta - Build: 20100215
MSM: 2.0 - Build: 20100215
EE2 Forum: 3.0.1 - Build: 20100215
nifootball.co.uk

Profile
 
 
Posted: 05 November 2007 04:18 PM   [ Ignore ]   [ # 167 ]  
Lab Assistant
RankRank
Total Posts:  261
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 

EE2: 2.0.1 Beta - Build: 20100215
MSM: 2.0 - Build: 20100215
EE2 Forum: 3.0.1 - Build: 20100215
nifootball.co.uk

Profile
 
 
Posted: 06 November 2007 05:32 PM   [ Ignore ]   [ # 168 ]  
Lab Assistant
RankRank
Total Posts:  261
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 

EE2: 2.0.1 Beta - Build: 20100215
MSM: 2.0 - Build: 20100215
EE2 Forum: 3.0.1 - Build: 20100215
nifootball.co.uk

Profile
 
 
Posted: 07 November 2007 05:04 PM   [ Ignore ]   [ # 169 ]  
Lab Assistant
RankRank
Total Posts:  261
Joined  03-06-2007

Is there no one that can help.

 Signature 

EE2: 2.0.1 Beta - Build: 20100215
MSM: 2.0 - Build: 20100215
EE2 Forum: 3.0.1 - Build: 20100215
nifootball.co.uk

Profile
 
 
Posted: 07 November 2007 05:45 PM   [ Ignore ]   [ # 170 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  493
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 51
17
 
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: 120608 Total Logged-in Users: 40
Total Topics: 126644 Total Anonymous Users: 2
Total Replies: 665735 Total Guests: 482
Total Posts: 792379    
Members ( View Memberlist )