return true;
}
- /**
- * Load related modules when needed
- *
- * @param string $cls Name of the class to be loaded
- *
- * @return boolean hook value; true means continue processing, false means stop.
- */
- function onAutoload($cls)
- {
- $dir = dirname(__FILE__);
-
- switch ($cls)
- {
- case 'Registration_ip':
- include_once $dir . '/'.$cls.'.php';
- return false;
- default:
- return true;
- }
- }
-
/**
* Called when someone tries to register.
*
* We record the successful registration and IP address.
*
* @param Profile $profile new user's profile
- * @param User $user new user
*
* @return boolean hook value
*/
- function onEndUserRegister($profile, $user)
+ public function onEndUserRegister(Profile $profile)
{
$ipaddress = $this->_getIpAddress();
$reg = new Registration_ip();
- $reg->user_id = $user->id;
+ $reg->user_id = $profile->id;
$reg->ipaddress = $ipaddress;
$result = $reg->insert();
function onPluginVersion(&$versions)
{
$versions[] = array('name' => 'RegisterThrottle',
- 'version' => STATUSNET_VERSION,
+ 'version' => GNUSOCIAL_VERSION,
'author' => 'Evan Prodromou',
'homepage' => 'http://status.net/wiki/Plugin:RegisterThrottle',
'description' =>