Better store check when trying to add a group to a user (from user panel)
Typecast user group
Fix front-end user group comparison bug when assigning a new user group

Resolves #11399

* upstream/pr/11975:
  Typecast user group
  Better store check when trying to add a group to a user (from user panel)