/**
  * constructor; set up listeners
  *
  * @author Andy Bennett
  */
 public function __construct()
 {
     $this->init();
     Kohana::config_load('steamauth');
     $this->conf = Kohana::config('steamauth.steamauth');
     Event::add('steamauth.login_success', array('steamauth_listeners', 'login_success'));
     Event::add('steamauth.logged_in', array('steamauth_listeners', 'logged_in'));
     Event::add('steamauth.show_login_form', array('steamauth_listeners', 'login_form'));
     Event::add('steamauth.logged_out', array('steamauth_listeners', 'logged_out'));
     Event::add('steamform_auth_register.complete', array('steamauth_listeners', 'register_complete'));
     Event::add('steamform_auth_register.complete', array('auth_email_events', 'register_complete_email'));
     Event::add('steamform_auth_register.show_form', array('steamauth_listeners', 'register_show_form'));
     Event::add('steamform_auth_profile.complete', array('steamauth_listeners', 'profile_complete'));
     Event::add('steamform_auth_profile.show_form', array('steamauth_listeners', 'profile_show_form'));
     Event::add('steamauth.change_credential_form', array('steamauth_listeners', 'change_credential_form'));
     Event::add('steamauth.change_credential_email', array('auth_email_events', 'change_credential_email'));
     Event::add('steamauth.change_credential_success', array('steamauth_listeners', 'change_credential_success'));
     Event::add('steamauth.forgotten_credential_form', array('steamauth_listeners', 'forgotten_credential_form'));
     Event::add('steamauth.forgotten_credential_email', array('auth_email_events', 'forgotten_credential_email'));
     Event::add('steamauth.forgotten_credential_sent', array('steamauth_listeners', 'forgotten_credential_sent'));
     Event::add('steamauth.forgotten_identity_form', array('steamauth_listeners', 'forgotten_identity_form'));
     Event::add('steamauth.forgotten_identity_email', array('auth_email_events', 'forgotten_identity_email'));
     Event::add('steamauth.forgotten_identity_sent', array('steamauth_listeners', 'forgotten_identity_sent'));
     Event::add('steamauth.activated', array('auth_email_events', 'activation_email'));
     Event::add('steamauth.activated', array('steamauth_listeners', 'activation_complete'));
     Event::add('steamauth.activation_error', array('steamauth_listeners', 'activation_error'));
     Event::add('steamauth.forgotten_credential_reset_email', array('auth_email_events', 'forgotten_credential_reset_email'));
     Event::add('steamauth.forgotten_credential_reset', array('steamauth_listeners', 'forgotten_credential_reset'));
     Event::add('steamauth.forgotten_credential_reset_error', array('steamauth_listeners', 'forgotten_credential_reset_error'));
     // Singleton instance
     self::$instance = $this;
 }
 /**
  * Set up the auth events (form show/form complete etc)
  *
  * @author Andy Bennett
  */
 public function __construct()
 {
     $this->setup = Kohana::config('controls.auth');
     // profile listeners
     Event::add('xform_xauth_profile.validate', array('xform_listeners', 'validate_listener'));
     Event::add('xform_xauth_profile.complete', array('auth_listeners', 'profile_complete'));
     Event::add('xform_xauth_profile.show_form', array('auth_listeners', 'profile_show_form'));
     Event::add('steamcore.crud_upload', array('crud_listeners', 'upload_listener'));
     // change_credential listeners
     Event::add('xform_xauth_change_credential.set', array('xform_listeners', 'set_listener'));
     Event::add('xform_xauth_change_credential.validate', array('xform_listeners', 'validate_listener'));
     Event::add('xform_xauth_change_credential.complete', array('xform_listeners', 'complete_listener'));
     Event::add('steamauth.change_credential_error', array('auth_listeners', 'change_credential_error'));
     Event::add('steamauth.change_credential_form', array('auth_listeners', 'change_credential_form'));
     Event::add('steamauth.change_credential_complete', array('auth_listeners', 'change_credential_complete'));
     Event::add('steamauth.change_credential_complete', array('auth_email_listeners', 'change_credential_email'));
     // activation listeners
     Event::add('steamauth.activated', array('auth_email_listeners', 'activation_email'));
     Event::add('steamauth.activated', array('auth_listeners', 'activation_complete'));
     Event::add('steamauth.activation_error', array('auth_listeners', 'activation_error'));
     // login / out listeners
     Event::add('steamauth.logged_in', array('auth_listeners', 'logged_in'));
     Event::add('steamauth.logged_out', array('auth_listeners', 'logged_out'));
     Event::add('xform_xauth_login.validate', array('xform_listeners', 'validate_listener'));
     Event::add('xform_xauth_login.complete', array('auth_listeners', 'test_login_listener'));
     Event::add('steamauth.show_login_form', array('auth_listeners', 'login_form'));
     Event::add('steamauth.login_success', array('auth_listeners', 'login_success'));
     // register listeners
     Event::add('xform_xauth_register.set', array('xform_listeners', 'set_listener'));
     Event::add('xform_xauth_register.validate', array('xform_listeners', 'validate_listener'));
     Event::add('xform_xauth_register.complete', array('xform_listeners', 'complete_listener'));
     Event::add('xform_xauth_register.show_form', array('auth_listeners', 'register_show_form'));
     Event::add('steamcore.register_complete', array('auth_email_listeners', 'register_complete_email'));
     Event::add('steamcore.register_complete', array('auth_listeners', 'register_complete'));
     // forgotten_credential listeners
     Event::add('xform_xauth_forgotten_credential.set', array('xform_listeners', 'set_listener'));
     Event::add('xform_xauth_forgotten_credential.validate', array('xform_listeners', 'validate_listener'));
     Event::add('xform_xauth_forgotten_credential.complete', array('xform_listeners', 'complete_listener'));
     Event::add('steamauth.forgotten_credential_error', array('auth_listeners', 'forgotten_credential_error'));
     Event::add('steamauth.forgotten_credential_form', array('auth_listeners', 'forgotten_credential_form'));
     Event::add('steamauth.forgotten_credential_complete', array('auth_email_listeners', 'forgotten_credential_email'));
     Event::add('steamauth.forgotten_credential_complete', array('auth_listeners', 'forgotten_credential_complete'));
     // forgotten_identity listeners
     Event::add('xform_xauth_forgotten_identity.set', array('xform_listeners', 'set_listener'));
     Event::add('xform_xauth_forgotten_identity.validate', array('xform_listeners', 'validate_listener'));
     Event::add('xform_xauth_forgotten_identity.complete', array('xform_listeners', 'complete_listener'));
     Event::add('steamauth.forgotten_identity_form', array('auth_listeners', 'forgotten_identity_form'));
     Event::add('steamauth.forgotten_identity_complete', array('auth_listeners', 'forgotten_identity_complete'));
     Event::add('steamauth.forgotten_identity_complete', array('auth_email_listeners', 'forgotten_identity_email'));
     // forgotten_credential_reset listeners
     Event::add('steamauth.forgotten_credential_reset', array('auth_email_listeners', 'forgotten_credential_reset_email'));
     Event::add('steamauth.forgotten_credential_reset', array('auth_listeners', 'forgotten_credential_reset_complete'));
     Event::add('steamauth.forgotten_credential_reset_error', array('auth_listeners', 'forgotten_credential_reset_error'));
     // Singleton instance
     self::$instance = $this;
 }