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
Can you not do this through Rules?
Event: After saving a new User account
Action: Add User role > [account] - Member
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.
click edit column on People page on specific user who will have role Member, and tick Memeber checkbox on that edit page.