Write out database thread
Write out local IDs of models
Write out thread when saving user
Lock all public database methods
Merge branch 'master' into builds
7.126