Fixes: #1922 Better error message in class plugin
Fixes: #1922 Fixed user manager foreignKey handling