Tom_
Member
I'm trying to create addon which allow me to execute custom function on succesfull login. I'm stuck, little bit help please.
I have code event listener -> load_class_controller
I have code event listener -> load_class_controller
PHP:
<?php
class Dev_Listener_LoadClassController
{
public static function extendMemberController($class, array &$extend)
{
if ($class == 'XenForo_ControllerPublic_Login')
{
$extend[] = 'Dev_ControllerPublic_Login';
}
}
}
PHP:
<?php
class Dev_ControllerPublic_Login extends XFCP_Dev_ControllerPublic_Login
{
public function actionIndex()
{
if ($login) {
// Just for test
file_get_contents('http://www.example.com/');
}
}
}