Fix user_save to automatically create user_<type> records for each type before it tries to save the extra info for that type

This commit is contained in:
james 2009-10-08 22:44:21 +00:00
parent 0015d2bcd7
commit 383581ef7f

View File

@ -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);
}
}