Hello,
this is indeed strange. What you can try is to add the following code in your currently active theme’s functions.php file:
function allow_reg ( $old_val ){
return true; // if this doesn’t work, try: return 1;
}
add_filter ( ‘wppb_register_setting_override’, ‘allow_reg’ );
Let me know how it turned out!
Gabriel
Thread Starter
neosin
(@neosin)
I added the code as mentioned but I have same error
Only an administrator can add new users.
In wppb.register.php the code that is giving this error for everyone
if ( $error ) :
$registerFilterArray['errorMessage'] = '<p class="error">'. $error .'</p><!-- .error -->';
$registerFilterArray['errorMessage'] = apply_filters('wppb_register_error_messaging', $registerFilterArray['errorMessage'], $error);
echo $registerFilterArray['errorMessage'];
endif;
if ( current_user_can( 'create_users' ) && $registration ) :
$registerFilterArray['alertMessage1'] = '<p class="alert">'. __('Users can register themselves or you can manually create users here.', 'profilebuilder') .'</p><!-- .alert -->';
$registerFilterArray['alertMessage1'] = apply_filters('wppb_register_alert_messaging1', $registerFilterArray['alertMessage1']);
echo $registerFilterArray['alertMessage1'];
elseif ( current_user_can( 'create_users' ) ) :
$registerFilterArray['alertMessage2'] = '<p class="alert">'. __('Users cannot currently register themselves, but you can manually create users here.', 'profilebuilder') .'</p><!-- .alert -->';
$registerFilterArray['alertMessage2'] = apply_filters('wppb_register_alert_messaging2', $registerFilterArray['alertMessage2']);
echo $registerFilterArray['alertMessage2'];
elseif ( !current_user_can( 'create_users' ) && !$registration) :
$registerFilterArray['alertMessage3'] = '<p class="alert">'. __('Only an administrator can add new users.', 'profilebuilder') .'</p><!-- .alert -->';
$registerFilterArray['alertMessage3'] = apply_filters('wppb_register_alert_messaging3', $registerFilterArray['alertMessage3']);
echo $registerFilterArray['alertMessage3'];
endif;
if ( $registration || current_user_can( 'create_users' ) ) :
the message we are getting is from this code
elseif ( !current_user_can( 'create_users' ) && !$registration) :
$registerFilterArray['alertMessage3'] = '<p class="alert">'. __('Only an administrator can add new users.', 'profilebuilder') .'</p><!-- .alert -->';
what is it checking?
From what I can see, it is checking if the user cannot create a user and the registration is turned off then show the message.
How can this be returning this message when registration is turned on?
Hello,
if you want me to check it out, send me a WP account with admin rights and FTP credentials to gabriel@cozmoslabs.com, and I will get back to you asap.
Gabriel