Correcting issue for group membership, where a site can throw a 503 error code

Correcting issue for group membership, where a site can throw a 503 error code, if there are a large number of users existing in the database. This commit fixes the problem at User Registration. A fix is still needed for viewing "Group Membership" at /groups/admin/membership/*.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/zikula/core/issues/2013
| Refs tickets  |  -
| License       | MIT
| Doc PR        | -
But, I didn't minimize it.I don't know why it got committed as minimized.