forked from science-ation/science-ation
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:
parent
0015d2bcd7
commit
383581ef7f
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user