Assign User Roles After Login

Ever thought what happens behind the scenes when someone logs into your WordPress site using Google or Facebook? When someone logs in using their social media account, what role they should be assigned? If you’re using...

Ever thought what happens behind the scenes when someone logs into your WordPress site using Google or Facebook? When someone logs in using their social media account, what role they should be assigned? If you’re using the Happy Social Login plugin, there’s a smart way to assign them the perfect role automatically.

What Are WordPress User Roles? #

WordPress comes with a few default user roles that control what a user can and cannot do on your site.
Some common user roles:
Administrator – Complete  access to everything.
Subscriber – Can read content and manage their own profile.
Customer – Best for WooCommerce users who want to shop.
Contributor – Can write blog posts but cannot publish them.
Author – Can write and publish their own content.
Editor – Can edit all content on your site.

Why Assign Roles Automatically? #

When a user logs in via Google, Facebook, or Twitter, they’re a new user. By default, WordPress assigns them the Subscriber role, but that’s not a best option always.

Let’s think of this:

  • You’re running an online store: You want users to be Customers so that they can shop from there.
  • You manage a multi-author blog: You want contributors, not just passive subscribers.
  • You’re building a community site: Maybe you want members to comment or create profiles.

Instead of changing each user’s role manually, Happy Social Login lets you automatically assign the right role right when they log in.

How to Set the Default Role for Social Users  #

Step 1: Log in to your WordPress Dashboard.

Step 2: Go to Settings > Happy Social Login.

Step 3: Click on the General Settings tab.

Step 4: Find the option called Default Role.

Step 5: Select your preferred role from the list (e.g., Subscriber, Editor, Contributor, etc.).

Step 6: Click Save Changes.
That’s it! All new user logging in via social media will now get that role.

Conclusion #

User role management might seem small, but it’s actually a powerful way to control your website’s experience and security. With Happy Social Login, assigning roles is easy, automatic, and super flexible. It’s a small setting, but it makes a big difference. Set it once, and your users will have the right access every time they log in.