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