correct getLatestTDoc for zombie document (refs #3981)
correct viewtemplate option for zombie document (refs #3981)
correct sql filter when update user account (refs #3981)