No results found. Try again with different words?
Search must be at least 3 characters.
- Using Spectra Heading Block
- Buttons
- Post Grid
- Content Timeline
- Social Share
- Google Map
- Add Testimonials to Your WordPress Website
- Info Box
- Team
- Icon List
- Price List
- Post Masonry
- Post Carousel
- Post Timeline
- Call To Action
- Advanced Columns
- Blockquote
- Marketing Button
- Gravity Form Styler
- Table Of Contents
- How-to Schema
- FAQ – Schema/ Accordion
- Inline Notice
- WP – Search
- Review Schema
- Lottie
- Taxonomy List
- Tabs Block
- How to Create Contact Forms for Your WordPress Website
- Star Rating
- Masonry Image Gallery
- Wireframe Blocks
- Spectra – Heading Block
- Spectra – Image Block
- Spectra – Buttons block
- ‘Translate Everything’ Feature in WPML
- Spectra – Container Block
- Spectra – Taxonomy Styling Options
- Spectra – Block Presets
- Image Gallery
- Counter Block
- Modal Block
- Registration Form Block
- Slider Block
- Custom CSS On Page Level
- Countdown Pro
- Designing Custom Navigation for Your Slider
- Instagram Feed
- Loop Builder
- Animations
- Using Spectra Login Form Block
- Global Block Style Extension
- How to Create Popups Using Spectra
- How to Add Custom Blocks Under Spectra Blocks
- Move Block Patterns from One Site to Another
- Getting Started with Grid Builder
- Adding a Newsletter Form to Your WordPress Site Footer
- How to Register High-Privileged Users on Your Website
- Section
- Troubleshooting – Icons missing from the blocks
- Spectra Patterns
- How to Set Multiple Column Fields in Contact Form 7 Styler of Spectra?
- Styling Checkbox / Radio / Acceptance control in Contact Form 7 Designer block of Spectra
- Unable to Style Checkbox / Radio Buttons / Acceptance Control using Contact Form 7 Styler of Spectra
- Tab Index – for multiple Gravity Forms
- How to Get Started with Spectra
- How to Exclude A Heading from Table of Contents?
- Spectra – Display Conditions for Blocks
- Importing Single Pages, Templates, and Block Patterns In Spectra
- How to Enable or Disable the Design Library Button
- Spectra – Copy and Paste Style
- Spectra – Container Flex property
- Spectra – Default Content Width
- Spectra – Blocks Editor Spacing
- Spectra – Collapse Panels
- Spectra – Responsive Conditions
- Spectra Pro Dynamic Content Extension
- Site Visibility
- Clearing Cache with Spectra Actions
- Quick Action Bar
- Add Multiple Instagram Accounts in Spectra
- Getting Started with Grid Builder
- Move the Title Bar to Top
- Resolving Layout Conflicts with Spectra Containers After Astra Update
- How to Register High-Privileged Users on Your Website
- Additional User Roles to Access AI Assistant
- Spectra Database Update Instructions (Version 2.0.0 and Below)
- Installing and Importing Starter Templates
- How to Get Started with Spectra
- Manually Install Spectra via FTP
- Automatic Beta Updates for Spectra
- How to Rollback to Previous Spectra Versions
- How to Load Google Fonts Locally
- Activate the Spectra Pro License Key
- How to Install Spectra Pro Plugin
- Translate Spectra Strings using Loco Translate
- How to add a Transparent / Sticky header?
- How to Change the Site Logo?
- How to Change Global Styles?
- How to Disable Title on Posts, Pages?
- How to add a transparent/ sticky header for a single page/post?
- Change Header and Footer Patterns in Spectra One Theme
- Add Custom/Google Fonts In Spectra One
- How to reset global default styling?
- Manually Install Spectra One via FTP?
- Disable or Enable Header/Footer for Specific Pages/Posts
How to Register High-Privileged Users on Your Website
Spectra prevents high-privileged users like “admin,” from registering through the Registration Form block. This is due to security reasons, as it’s crucial not to allow unknown users to have admin privileges.
Only certain user roles are allowed to register on your site. Moreover, the option to select a user role is visible only to existing admins/super admins:
As you can see, we’ve also removed the ‘admin’ and ‘editor’ user roles from the “New User Role” list. This way, you can easily manage other site user roles.
Low-level users like subscribers, contributors, and others won’t even see this dropdown:
However, we recognize that there may be situations where you need a high-privilege “admin” user to sign up on your site.
For example, if you’re providing personalized training, you might want a customer to briefly have admin access to grasp the website’s features better.
To do this, we offer a filter that allows you to bypass these rules and register any user role you need. You can also show the user role dropdown to low-level users like Editors or Contributors.
In this article, we will cover both these topics:
- Allowing High-Privileged Users to Register on Your Site
- Displaying the “User Role” Dropdown to Low-Level Users
Allowing High-Privileged Users to Register on Your Site
To do this, paste the following code snippet in your child theme’s functions.php file.
add_filter( 'spectra_pro_registration_form_change_new_user_role', 'spectra_enforce_admin_user' );
function spectra_enforce_admin_user( $role ) {
return 'administrator'; // Update your user role slug here as required.
}
For Astra users, functions.php will be available at Appearance > Theme File Editor.
Click on the Update File button once done.
Now, anyone registering through the form will have “Administrator” access.
Note: This approach is not recommended as a first resort. Before implementing it, carefully assess and explore alternative solutions. If no other workaround is feasible, then use this code.
Displaying the “User Role” Dropdown to Low-Level Users
If you want to show the “New User Role” option to users with low privileges, add the following code to your child theme’s functions.php file.
add_filter( 'spectra_pro_registration_form_role_manager', 'provide_field_access_to_user_role', 10, 1 );
function provide_field_access_to_user_role( $handle_user_role ) {
$current_user = wp_get_current_user();
if ( $current_user instanceof WP_User ) {
$user_roles = $current_user->roles;
// Adjust your desired user roles in the following condition, so they can access the "New User Role" field in the editor UI.
if (
in_array( 'editor', $user_roles, true ) ||
in_array( 'author', $user_roles, true )
) {
$handle_user_role = true;
}
}
return $handle_user_role;
}
The code above lets low-privileged users choose the user role. To add desired user roles, modify the above code as dictated.
Note: If you choose ‘Select’, it picks the default role for new users, as set in WordPress Settings under General > New User Default Role.
That’s it! At Spectra, we care about your security. That’s why, we always recommend our users to update themes & plugins with their latest versions to get better stability.
For any doubts, please feel free to open a support ticket below.
We don't respond to the article feedback, we use it to improve our support content.