Merge remote branch 'origin/platal-1.0.0'
[platal.git] / modules / profile.php
index f85558e..b737ac6 100644 (file)
@@ -262,9 +262,6 @@ class ProfileModule extends PLModule
         // marketing if the owner has not subscribed and the requirer has logged in.
         $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());
-        }
 
         // Profile view are logged.
         if (S::logged()) {
@@ -607,7 +604,7 @@ class ProfileModule extends PLModule
               FROM group_members AS m
         INNER JOIN groups AS a ON(m.asso_id = a.id)
          LEFT JOIN group_events AS e ON(e.asso_id = m.asso_id AND e.archive = 0)
-             WHERE uid = {?} GROUP BY m.asso_id ORDER BY a.nom', S::i('uid'));
+             WHERE m.uid = {?} GROUP BY m.asso_id ORDER BY a.nom', S::i('uid'));
         $page->assign('assos', $req->fetchAllAssoc());
     }