Part of the EllisLab Network
   
4 of 42
4
FreakAuth light 1.1 released
Posted: 29 July 2007 05:55 PM   [ Ignore ]   [ # 31 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006
See64 - 29 July 2007 08:38 AM

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?

No idea, I tested FAL 1.1 with last CI 1.5.4 and everything worked fine.

 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: 29 July 2007 06:09 PM   [ Ignore ]   [ # 32 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006
maesk - 29 July 2007 09:08 AM

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

Cheers Maesk for the donation by me and Chris (aka grahack - he is in holydays now so don’t blame him for low activity in the forum!).

About your question:

You have 2 ways:

a) use the helper function displayLoginForm() in your view

b) this is better in my opinion, use the fal_front method in your controller.

<?php

class YourController extends Controller
{    
    
/**
     * Initialises the controller
     *
     */
    
function YourController()
    
{
        parent
::Controller();
        
        
$this->load->library('FAL_front', 'fal_front');
        
        
$this->_container = $this->config->item('FAL_template_dir').'template/YOURcontainer';
    
}
    
    
// --------------------------------------------------------------------
    
    /**
     * Displays the login form.
     *
     */
    
function index()
    
{            
        $this
->login();    
    
}
    
    
// --------------------------------------------------------------------
    
    /**
     * Displays the login form.
     *
     */
    
function login() //you can change the action name
    
{            
        $data[
'fal'] = $this->fal_front->login();
        
$this->load->view($this->_container, $data);     
    
}

Speaking about method b) take as example the auth.php controller and read this tutorial:

- I don’t like that “auth.php” controller!

Hope this helps!

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: 31 July 2007 10:50 AM   [ Ignore ]   [ # 33 ]  
Grad Student
Avatar
Rank
Total Posts:  89
Joined  06-05-2007

@DanFreak

Thanks I already fixed my “image” problem. Oh I was reading up on your Custom Userprofile part two and I seem to run into a snag. Most particularly the “view.php”

Userprofile for user
A PHP Error was encountered
Severity
: Notice

Message
: Undefined variable: user

Filename
: app/view.php

Line Number
: 1


A PHP Error was encountered
Severity
: Notice

Message
: Undefined variable: user

Filename
: app/view.php

Line Number
: 3

EDIT

username
:
A PHP Error was encountered
Severity
: Notice

Message
: Undefined variable: user

Filename
: app/view.php

Line Number
: 6

e
-mail:
A PHP Error was encountered
Severity
: Notice

Message
: Undefined variable: user

Filename
: app/view.php

Line Number
: 7

no data in DB
: please add them

Now as far as I can tell PHP is telling me it can’t place the data into the variables cuz there’s no DB to connect to. I did everything that needs to be done in the Myaccount controller as far as the tutorial was concerned. My question is do I have to query the database for this? cuz I tried doing that to no avail…

 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: 31 July 2007 10:55 AM   [ Ignore ]   [ # 34 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006
Jamongkad - 31 July 2007 10:50 AM

@DanFreak

Now as far as I can tell PHP is telling me it can’t place the data into the variables cuz there’s no DB to connect to. I did everything that needs to be done in the Myaccount controller as far as the tutorial was concerned. My question is do I have to query the data for this? cuz I tried doing that to no avail…

PHP is simply telling you that you didn’t pass data to the view for the variable $user.

do you have data in your DB?

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: 31 July 2007 11:30 AM   [ Ignore ]   [ # 35 ]  
Grad Student
Avatar
Rank
Total Posts:  89
Joined  06-05-2007
danfreak - 31 July 2007 10:55 AM
Jamongkad - 31 July 2007 10:50 AM

@DanFreak

Now as far as I can tell PHP is telling me it can’t place the data into the variables cuz there’s no DB to connect to. I did everything that needs to be done in the Myaccount controller as far as the tutorial was concerned. My question is do I have to query the data for this? cuz I tried doing that to no avail…

PHP is simply telling you that you didn’t pass data to the view for the variable $user.

do you have data in your DB?

Dan

Thanks I already solved the problem. The array $data was conflicting with my custom template system. Your original code had the the $data array already covered, incidentally my template system uses $data as well. PHP couldn’t tell the difference! so I had to refactor your code in order for it to work on my end hahaha.

Nice fast feedback I love the way you guys handle this keep up the good work!

 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: 31 July 2007 11:39 AM   [ Ignore ]   [ # 36 ]  
Grad Student
Avatar
Rank
Total Posts:  62
Joined  03-23-2007

Thanks Dan!

Since my application is running pretty well now and already tested I don’t want to change all my controllers now, and besides: I DO like that auth.php controller wink
But it’s good to know how it can be done and I will do it with method b) for my next application.
I’m still very pleased with FAL!

maesk

Profile
 
 
Posted: 31 July 2007 11:53 AM   [ Ignore ]   [ # 37 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

I’m happy you guys like FAL (= mine and grahack sweat)!

wink

@Jamongkad

cool, so we know that the userprofile tutorial still works for FAL 1.1

@maesk

Super! so next time you have multiple solutions!

Have a nice evening guys!

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: 31 July 2007 12:37 PM   [ Ignore ]   [ # 38 ]  
Grad Student
Avatar
Rank
Total Posts:  89
Joined  06-05-2007

@DanFreak

Since we’re in the process of fine tuning Fal I would like to introduce another niggle hehe. Once I got the myaccount/edit controler/method working. CI seems to spout out a strange but interesting error.

Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\wamp\www\myswebsite\system\libraries\Profiler.php on line 169

Upon inspection of this of Profiler.php line 169

line 168://$output .= "<tr><td width='50%' style='color:#000;background-color:#ddd;'>&#36;_POST[".$key."]&nbsp;&nbsp;</td><td width='50%' style='color:#009900;font-weight:normal;background-color:#ddd;'>".htmlspecialchars(stripslashes($val))."</td></tr>\n";

line 169:$output .= "<tr><td width='50%' style='color:#000;background-color:#ddd;'>$_POST[".$key."]  </td><td width='50%' style='color:#009900;font-weight:normal;background-color:#ddd;'>";

It seems line 168 was commented out to make room for line 169. So as an experiment decided to comment out line 169 as well and lo and behold it worked! but there was this weird benchmark result that comes out of the bottom of the edit form..

please click on link below(sorry I don’t know how does this forum display images).
http://i8.photobucket.com/albums/a21/jamongkad/error.jpg

 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: 31 July 2007 12:42 PM   [ Ignore ]   [ # 39 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

@Jamongkad

This is a CI problem. I’m aware about a Profiler problem in CI 1.5.3, not sure about CI 1.5.4.

Report it to the CI guys.

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: 31 July 2007 12:54 PM   [ Ignore ]   [ # 40 ]  
Grad Student
Avatar
Rank
Total Posts:  89
Joined  06-05-2007
danfreak - 31 July 2007 12:42 PM

@Jamongkad

This is a CI problem. I’m aware about a Profiler problem in CI 1.5.3, not sure about CI 1.5.4.

Report it to the CI guys.

Dan

Ok will do

 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
 
 
   
4 of 42
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: 64455 Total Logged-in Users: 24
Total Topics: 80963 Total Anonymous Users: 1
Total Replies: 435698 Total Guests: 192
Total Posts: 516661    
Members ( View Memberlist )