View Single Post
Old 07-12-2008, 03:44 AM   #4 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

Well, one way would be to transfer the logic to your user_controller.php file, something like this:

PHP Code:
 <?php 

require_once dirname(__FILE__) . "/action.php"

$pController = new User_Controller;
$pController->doLogin();

class 
User_Controller extends ActionController 



  public function 
doLogin() { 
     if (isset(
$_POST['login']))
     {
         
// do your stuff
     
}
     else
     {
         
// set an error, redirect, whatever you want here
     
}
  } 
   
  public function 
doRegister() { 
     
  } 





?>
You can also play around with using __construct() to determine the course of action for the object when it's instantiated.

If you're not yet familiar with them, you can read up on them at the PHP site.
-m
delayedinsanity is offline  
Reply With Quote
The Following User Says Thank You to delayedinsanity For This Useful Post:
cptnbunghole (07-12-2008)