1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Controller extension fails after update to XF1.5

Discussion in 'XenForo Development Discussions' started by rhodes, Jun 19, 2016.

  1. rhodes

    rhodes Active Member

    Within my XF1.3 installation I’ve extended my login controller like this
    class My_Login_Listener
      public static function 
    listenController($class, array &$extend)
      if (
    $class == 'XenForo_ControllerPublic_Login')
    $extend[] = 'My_Login_Connector';

    My_Login_Connector extends XFCP_My_Login_Connector
      public function 
    sth after XF login
    This worked perfect in XF1.3, but unfortunately fails after update to XF1.5

    It seems as if class XenForo_ControllerPublic_Login is not called any more. When I „echo“ the class names in the example above only XenForo_ControllerPublic_Index and XenForo_ControllerPublic_Forum are listed.

    Of course I could replace XenForo_ControllerPublic_Login with XenForo_ControllerPublic_Index, but in this case my function would be executed every time the forum home page is viewed, not only after login.

    Any idea what I can do to execute my function only after login in XF 1.5?
  2. Thomas.B

    Thomas.B Well-Known Member

    There is no error in the code you posted. The problem is likely rather in the body of your Login action. Btw, extending the completeLogin() method is probably more suitable for your case..
    Xon likes this.

Share This Page