From 383581ef7f4f9485ad4b155792a5de59e8c1fc06 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 8 Oct 2009 22:44:21 +0000 Subject: [PATCH] Fix user_save to automatically create user_ records for each type before it tries to save the extra info for that type --- user.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/user.inc.php b/user.inc.php index 4abcd96..bc043c8 100644 --- a/user.inc.php +++ b/user.inc.php @@ -355,6 +355,8 @@ function user_save($u) user_set_password($u['id'], $u['password']); foreach($u['types'] as $t) { + //give em a record, the primary key on the table takes care of uniqueness + $q=mysql_query("INSERT INTO users_$t (users_id) VALUES ('{$u['id']}')"); call_user_func("user_save_$t", $u); } }