Yes, that's the one. When you have the source, check out Web\Components\mojoSetup.cs to see it in action:
Role.AddUser(adminRole.RoleId, adminUser.UserId, adminRole.RoleGuid, adminUser.UserGuid);
There may be alternative methods to add users to roles, but this is the one that I am using.
Jamie