]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apifriendshipscreate.php
Remove CSRF protection from username/password login and from OpenID login.
[quix0rs-gnu-social.git] / actions / apifriendshipscreate.php
index a824e734bf89bcdefaac2d644a8aadf3bbb647e2..a7ec5b28a44452996e666d60c36ce72075fc400b 100644 (file)
@@ -24,7 +24,7 @@
  * @author    Dan Moore <dan@moore.cx>
  * @author    Evan Prodromou <evan@status.net>
  * @author    Zach Copley <zach@status.net>
- * @copyright 2009 StatusNet, Inc.
+ * @copyright 2009-2010 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link      http://status.net/
  */
@@ -67,7 +67,7 @@ class ApiFriendshipsCreateAction extends ApiAuthAction
         parent::prepare($args);
 
         $this->user   = $this->auth_user;
-        $this->other  = $this->getTargetUser($id);
+        $this->other  = $this->getTargetProfile($this->arg('id'));
 
         return true;
     }
@@ -97,7 +97,7 @@ class ApiFriendshipsCreateAction extends ApiAuthAction
 
         if (!in_array($this->format, array('xml', 'json'))) {
             $this->clientError(
-                _('API method not found!'),
+                _('API method not found.'),
                 404,
                 $this->format
             );
@@ -106,7 +106,7 @@ class ApiFriendshipsCreateAction extends ApiAuthAction
 
         if (empty($this->other)) {
             $this->clientError(
-                _('Could not follow user: User not found.'),
+                _('Could not follow user: profile not found.'),
                 403,
                 $this->format
             );