Jump to content

Override the Authcontroller.php, show nothing!


ed0522

Recommended Posts

<?php

class AuthController extends AuthControllerCore {

 

  function eddy()

  {

    echo "aaaaaaaaaaa";

  }

}

 

I just create the directory as "override/controllers/ AuthController.php in the root of my module.

 

What's wrong?

 

 

Link to comment
Share on other sites

authentication.tpl is not a module file. Can it be overried? Could you tell me the right file path to put the overriding file?

 

Yes you're right, authentication.tpl is not module file it's theme file so no need to override.

 

Your custom method on authController wont running up by it self.

You should call your custom method within another method whenever you need it

For example, call your custom method inside initContent() method if you want to display it.

	public function initContent()
	{
	    $this->eddy();
            parent::initContent();
	}
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...