Simplify profile fetching
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Fri, 19 Mar 2010 23:12:15 +0000 (00:12 +0100)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Mon, 22 Mar 2010 12:49:29 +0000 (13:49 +0100)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
modules/profile.php

index 6c2dc9f..3999826 100644 (file)
@@ -233,7 +233,7 @@ class ProfileModule extends PLModule
 
         // Fetches profile's and profile's owner information and redirects to
         // marketing if the owner has not subscribed and the requirer has logged in.
-        $profile = Profile::getBulkProfilesWithPIDs(array($pid), Profile::FETCH_ALL, $view);
+        $profile = Profile::get($pid, Profile::FETCH_ALL, $view);
         $owner = $profile->owner();
         if (S::logged() && !is_null($owner) && $owner->state == 'pending') {
             pl_redirect('marketing/public/' . $profile->hrid());