lingthio / Flask-User-starter-app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assign a user role when user registers to website with flask-user

bobross1 opened this issue · comments

I'm trying to assign a default user role to newly registered accounts. In the flask-user documentation this code is used to manually assign a user role to a new account:

user.roles.append(Role(name='Admin'))

But how can this be done automatically when the user registers?