2009-12-15, 08:34 PM
I'm trying to write a plugin that uses this hook:
And I'm wondering how to work with the "$this" object inside my plugin code.
I've declared my plugin function properly as
But when I try and access the data, for instance the username:
It fails. I'm not at home right now, so I can't see the errors being generated (I intend to fix my access to the logs later) and I'm hoping someone can tell me what I'm missing. I don't often work with objects in php (in fact, only with MyBB do I on any kind of frequent basis), so I'm probably just missing something obvious.
$plugins->run_hooks_by_ref("datahandler_user_insert", $this);
And I'm wondering how to work with the "$this" object inside my plugin code.
I've declared my plugin function properly as
function plugin_user_insert($this)
But when I try and access the data, for instance the username:
$this->user_insert_data['username']
It fails. I'm not at home right now, so I can't see the errors being generated (I intend to fix my access to the logs later) and I'm hoping someone can tell me what I'm missing. I don't often work with objects in php (in fact, only with MyBB do I on any kind of frequent basis), so I'm probably just missing something obvious.