]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/UserLimit/UserLimitPlugin.php
Added a lot more type-hints where they will happen. Please note that I found
[quix0rs-gnu-social.git] / plugins / UserLimit / UserLimitPlugin.php
index 412f8604a55d7b4e9295e3490f07f88aceeefd0b..ed4ff9df497267bda79f09ac6c5290a1e0467a47 100644 (file)
@@ -49,13 +49,23 @@ class UserLimitPlugin extends Plugin
 {
     public $maxUsers = null;
 
-    function onStartUserRegister(&$user, &$profile)
+    public function onStartUserRegister(Profile $profile)
     {
         $this->_checkMaxUsers();
         return true;
     }
 
-    function onStartRegistrationTry($action)
+    /**
+     * Called when someone tries to register.
+     *
+     * We check the IP here to determine if it goes over any of our
+     * configured limits.
+     *
+     * @param Action $action Action that is being executed
+     *
+     * @return boolean hook value
+     */
+    function onStartRegistrationTry(Action $action)
     {
         $this->_checkMaxUsers();
         return true;
@@ -81,10 +91,10 @@ class UserLimitPlugin extends Plugin
         }
     }
 
-    function onPluginVersion(&$versions)
+    function onPluginVersion(array &$versions)
     {
         $versions[] = array('name' => 'UserLimit',
-                            'version' => STATUSNET_VERSION,
+                            'version' => GNUSOCIAL_VERSION,
                             'author' => 'Evan Prodromou',
                             'homepage' => 'http://status.net/wiki/Plugin:UserLimit',
                             'description' =>