Use __construct method for adding user role by default
// Your user entity
class User {
public function __constuct() {
$this->roles = array(
'ROLE_CLIENT', // or other roles
);
}
}
or in action of controller where you create new user add any roles to them.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more