Custom role

actually, I just had a case for doing this myself and it was not easy to add a middleware to the register function.
There is still a way to do this using a lyfecycle hook.
Take a look at this post: