Untitled-27 Back to Project

Getting Started Untitled-27

Customisation Untitled-27

Troubleshooting Untitled-27

Security Untitled-27

Users & roles Untitled-27

Working with Client Portal Untitled-27

Integrations Untitled-27

Legacy Documentation Untitled-27

How do I add existing WordPress users to Client Portal?

Client Portal requires users to have the 'CP Client' role to access portals. But if you already have users on your WordPress site with different roles (like 'Subscriber' or 'Author'), you've got two straightforward ways to sort this out.

The simple way (recommended for most people)

The easiest solution is to assign multiple roles to your existing users. WordPress supports this "under the hood," but doesn't show you the option by default.

Step 1: Install the HM Multiple Roles plugin (it's free)

Step 2: Go to Users → All Users and click on any existing user

Step 3: You'll now see checkboxes instead of a dropdown for roles. Simply tick both their existing role AND 'CP Client'

That's it. Your users keep their current permissions and can access Client Portal.

Multisite note: This plugin works perfectly on WordPress multisite networks, so you can manage user roles across multiple sites from one place.

Alternative plugins: If you want more control over roles and capabilities, User Role Editor or Members are solid choices. Both support multisite networks and offer more advanced features, though they're more complex than you probably need for this specific task.

The advanced way (for developers)

Rather than adding multiple roles, you can tell Client Portal to accept different user roles directly. This requires editing code, so it's definitely not for everyone.

Important safety warning: This method involves editing PHP code. If something goes wrong, it could break your site. Only attempt this if you're comfortable with code and have a recent backup.

Option A: Using a child theme (recommended)

This is the safer approach because your changes won't be lost when your theme updates.

  1. Create a child theme if you don't already have one. WordPress has a guide here, or ask your developer to set one up.
  2. Add this code to your child theme's functions.php file:
php
function my_leco_cp_client_roles( $roles ) {
    $roles = array_merge( $roles, array( 'subscriber' ) );
    return $roles;
}
add_filter( 'leco_cp_client_roles', 'my_leco_cp_client_roles' );
  1. Change 'subscriber' to whatever role your users currently have

Option B: Direct functions.php editing (higher risk)

Warning: If you edit your theme's functions.php file directly, your changes will disappear when the theme updates. You'll need to add the code again after each theme update.

  1. Backup your site first (seriously, don't skip this)
  2. In your WordPress dashboard, go to Appearance → Theme Editor
  3. Click on Theme Functions (functions.php)
  4. Add this code at the bottom of the file:
php
function my_leco_cp_client_roles( $roles ) {
    $roles = array_merge( $roles, array( 'subscriber' ) );
    return $roles;
}
add_filter( 'leco_cp_client_roles', 'my_leco_cp_client_roles' );
  1. Change 'subscriber' to whatever role your users currently have
  2. Click Update File

 

For multiple roles: If you want Client Portal to work with several different roles, list them like this:

php
function my_leco_cp_client_roles( $roles ) {
    $roles = array_merge( $roles, array( 'subscriber', 'contributor', 'author' ) );
    return $roles;
}
add_filter( 'leco_cp_client_roles', 'my_leco_cp_client_roles' );

 

Multisite compatibility: This code works on multisite networks, but you'll need to add it to each individual site where you want Client Portal to accept different user roles.

Which method should you choose?

Go with the plugin method if:

  • You're not comfortable editing code
  • You only have a few users to sort out
  • You want the safest approach
  • You're running a multisite network (plugins are easier to manage across multiple sites)

Use the child theme method if:

  • You're comfortable with code
  • You have lots of existing users
  • Your developer can set up a child theme for you
  • You want a "set it and forget it" solution

Avoid direct functions.php editing unless:

  • You're confident with PHP
  • You remember to re-add the code after theme updates
  • You definitely have a recent backup

Something not working?

If users still can't access their portals after trying either method, double-check:

  • The user has the correct role assigned
  • You've added them to the specific portal (not just given them the role)
  • Your backup is recent (just in case you need to restore)
  • On multisite: you've configured the roles on the correct site

Most issues are down to missing one of these steps rather than the methods not working.

Still stuck? If you're on a multisite network, user management can be a bit more complex. Network administrators can manage users across the entire network, while individual site administrators can only manage users for their specific site.

If you've tried the above and you're having problems, contact our support team - we're on hand to help!