This component will approve the users requests to public groups automatically. (This is how now it works on facebook).
This component is also a tutorial for how to enhance your social network with sample component code without editing the core.
Arsalan, I tested this component and it also auto-approves closed/private groups. Can you please check? Thank you.