One thing that I see wrong is this: cs_set_user_model(id,"resetModel")
Also, you don't need to return anything from resetModel() and you shouldn't check if !is_user_connected() since you are actually looking for the case where the user IS connected.
PHP Code:
public resetModel(id)
{
if( is_user_connected(id) )
{
cs_set_user_model(id, oldmodel[id])
}
}
oldmodel[] is never assigned anywhere.
__________________