]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/RegisterThrottle/RegisterThrottlePlugin.php
Events on user registrations now strictly typed
[quix0rs-gnu-social.git] / plugins / RegisterThrottle / RegisterThrottlePlugin.php
index be986fa2b818ca03edc4cc832bb50c00757b8388..2cfd98aad77dc169a27bbd5546e28b4d9ac6da9a 100644 (file)
@@ -142,11 +142,10 @@ class RegisterThrottlePlugin extends Plugin
      * 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();
 
@@ -157,7 +156,7 @@ class RegisterThrottlePlugin extends Plugin
 
         $reg = new Registration_ip();
 
-        $reg->user_id   = $user->id;
+        $reg->user_id   = $profile->id;
         $reg->ipaddress = $ipaddress;
 
         $result = $reg->insert();