Fixing PHP warning.
Adding recalculate feature see #6422
Admin is also ROLE_SESSION_MANAGER
Updating sql db script from Chash.