Updated the user_copy function to avoid copying the registrations_id and grade fields.

This commit is contained in:
jacob 2012-02-07 17:31:33 +00:00
parent 0f26cbbf2c
commit 6ea87600da

View File

@ -1196,7 +1196,7 @@ function user_create($accounts_id, $conferences_id=0)
/* Get old user data if available */
$results = mysql_fetch_assoc(mysql_query("SELECT * FROM users WHERE accounts_id = '$accounts_id' ORDER BY id DESC LIMIT 1"));
if(is_array($results)){
$skipfields = array('id', 'created', 'lastlogin', 'year', 'accounts_id', 'conferences_id', 'deleted', 'deleteddatetime');
$skipfields = array('id', 'created', 'lastlogin', 'year', 'accounts_id', 'conferences_id', 'deleted', 'deleteddatetime', 'registrations_id', 'grade');
foreach($results as $fname => $value){
if(!in_array($fname, $skipfields) && $value != null){
$fields[$fname] = $value;