sorry, i was just changing the names of thigns for posting purposes. They all use the same name 'BorrowEmail' in the code
On Feb 21, 10:14 am, John Andersen <[email protected]> wrote: > Question! What is yourcomponentcalled/named? > In the code below, you are using both "BorrowEmail" and > "NeighborrowEmail"! > Enjoy, > John > > On Feb 21, 3:02 am, dtirer <[email protected]> wrote: > > > oh sorry, here it is: > > > /** > > * Confirmation email for new basic registration users > > * @param $id - User ID > > * @param $password - Un-hashed password > > */ > > public function send_registration_email($email, $password) > > { > > $this->BorrowEmail->to = $email; > > $this->BorrowEmail->subject = 'Welcome!'; > > $this->NeighborrowEmail->send("Thank you for > > registering! You > > will be contacted shortly!"); > > } > > > On Feb 20, 2:32 am, John Andersen <[email protected]> wrote: > > > > Thanks :) > > > Please show the code/function around line 20, where the error was > > > found! > > > John > > > > On Feb 20, 12:18 am, dtirer <[email protected]> wrote: > > > > > Sure here it is: > > > > > // components/borrow_email.php > > > > > <?php /* BORROW EMAILComponent*/ > > > > > App::import('Component', 'Email'); > > > > > class BorrowEmailComponent extends EmailComponent > > > > { > > > > // functions > > > > } > > > > ?> > > > > > ---------- > > > > > <?php // app/app_controller.php > > > > > class AppController extends Controller > > > > { > > > > var $components = array('Auth', 'PasswordHelper', > > > > 'BorrowEmail'); > > > > var $helpers = array('Html', 'Form', 'Javascript', 'Time'); > > > > > function beforeFilter() > > > > { > > > > $this->Auth->allow('*'); > > > > $this->Auth->fields = array('username' => 'email', > > > > 'password' => > > > > 'password'); > > > > $this->Auth->loginAction = array('controller' => > > > > 'users', 'action' > > > > => 'login'); > > > > $this->Auth->logoutRedirect = array('controller' => > > > > 'items', > > > > 'action' => 'index'); > > > > $this->Auth->loginRedirect = array('controller' => > > > > 'items', 'action' > > > > => 'index'); > > > > $this->Auth->authorize = 'controller'; > > > > } > > > > > function constructClasses() > > > > { > > > > parent::constructClasses(); > > > > $this->Email = $this->BorrowEmail; > > > > } > > > > > } > > > > > ?> > > > > > On Feb 19, 9:05 am, John Andersen <[email protected]> wrote: > > > > > > Please show the code in your new class, specially the constructor > > > > > code. > > > > > Enjoy, > > > > > John > > > > > > On Feb 19, 1:12 am, dtirer <[email protected]> wrote: > > > > > > > I'm trying to extend the emailcomponentas they do in this > > > > > > tutorial:http://cakebaker.42dh.com/2009/09/08/extending-cakephps-core-components/ > > > > > > > However I keep getting this error: Fatal error: Call to undefined > > > > > > method stdClass::send() in /home/neighborrow/nyudev.neighborrow.com/ > > > > > > app/controllers/components/neighborrow_email.php on line 20 > > > > > > > Any idea why? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
