Fix many uid fields in profile tables created by newdirectory.
[platal.git] / modules / payment / money / paypal.inc.php
index 231c86d..45ad720 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2009 Polytechnique.org                              *
+ *  Copyright (C) 2003-2010 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -75,9 +75,9 @@ class PayPal
                          IF(t1.display_tel != '', t1.display_tel, t2.display_tel) AS night_phone_b
                    FROM  auth_user_quick   AS q
               LEFT JOIN  profile_addresses AS a  ON (q.user_id = a.pid AND FIND_IN_SET('current', a.flags))
-              LEFT JOIN  profile_phones    AS t1 ON (t1.uid = a.uid AND t1.link_type = 'address'
+              LEFT JOIN  profile_phones    AS t1 ON (t1.pid = a.pid AND t1.link_type = 'address'
                                                      AND t1.link_id = a.adrid)
-              LEFT JOIN  profile_phones    AS t2 ON (t2.uid = a.uid AND t2.link_type = 'user'
+              LEFT JOIN  profile_phones    AS t2 ON (t2.pid = a.pid AND t2.link_type = 'user'
                                                      AND t2.link_id = 0)
               LEFT JOIN  geoloc_localities AS l  ON (l.id = a.localityId)
                   WHERE  q.user_id = {?}