--- spam/modules/spam_user.inc.OLD	2008-12-25 06:42:11.000000000 +0100
+++ spam/modules/spam_user.inc		2009-02-18 14:10:22.000000000 +0100
@@ -223,13 +223,8 @@ function user_spamapi($op, $arg1 = NULL,
  * Be sure we're scanning the latest profile data.
  */
 function spam_user_profile_update($user) {
-  $profile = array();
-
-  $result = db_query('SELECT fid, value FROM {profile_values} WHERE uid = %d', $user->uid);
-  while ($value = db_fetch_object($result)) {
-    $name = db_result(db_query('SELECT name FROM {profile_fields} WHERE fid = %d', $value->fid));
-    $user->$name = $value->value;
+  if (module_exists('profile')) {
+    profile_load_profile($user);
   }
   return $user;
 }
-
