Added discourse hub nickname operations simplify and avoid repeated code
Refactored username validations to avoid repeated code
Merge pull request #1159 from jd-erreape/user_refactors

Refactors in user model