]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/AnonymousFave/anondisfavor.php
- Lookup anon profiles by ID (safer because they are guranteed to be unique) and...
[quix0rs-gnu-social.git] / plugins / AnonymousFave / anondisfavor.php
index 9fd56fdc3240b3c2f2564924f9602b4b4ab5cace..f39d5a77804fbf2994629583908d489c331c91a7 100644 (file)
@@ -54,15 +54,7 @@ class AnonDisfavorAction extends RedirectingAction
     {
         parent::handle($args);
 
-        $anon = $_SESSION['anon_nickname'];
-
-        $profile = Profile::staticGet('nickname', $anon);
-
-        if (empty($profile)) {
-            common_debug(
-                "AnonDisFavorAction - Anon user tried to disfave a notice but doesn't have a profile."
-            );
-        }
+        $profile = AnonymousFavePlugin::getAnonProfile();
 
         if (empty($profile) || $_SERVER['REQUEST_METHOD'] != 'POST') {
             $this->clientError(