If I have a role i.e. Member. How to set 'Member' as a default role for the users after they registered yourself ? Please help. Thanks
It is always recommended to use contributed module instead of writing a custom module if it is in stable release and fulfills your requirements. Auto Assign Role is exact solution of your problem.
- Install the module.
- Go to Configuration->People-> Auto Assign roles.
- Click on Automatic Assignment.
- Select your default role. (Member in your case)
- Click on save.