Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Help in resolving 'activation key' error in script



9:06 am on Mar 20, 2011 (gmt 0)

Hi there,

I'm having some serious troubles in getting a wordpress plugin to work properly. The CMS Members plugin to be precise.

The plugin is supposed to send an activation key upon user registration. However when the link is clicked I always keep getting the error that 'activation key is invalid for the plan'

Here's the piece of code that I think deals with the activation.. perhaps someone can help figure this out?

if ( (get_usermeta($user_data->ID,'activate_key')==$_GET['activate_key']) && (get_usermeta($user_data->ID,'status')=='incomplete') ){
$thanksmsg=__('Your account has been successfully activated.','wwm') . ' <a href="'.wp_login_url().'"> '.__('Log In').'</a>';

if (get_option('free_members_welcome_mail')) {


$subject='Welcome to '.$blogname.'!';

$body.='<p><small>Powered by <a href="http://wpwave.com/plugins/cms-members/">CMS Members</a><small>';

wwm_mail_actions('html'); //set actions

if ( !wp_mail($to, $subject, $body, $header) )
$msg= __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') ;
} //free members welcome

echo '<div class="wwm-thanksmessage">'.$thanksmsg.'</div>';
}elseif($user_data->ID && get_usermeta($user_data->ID,'status')!=='incomplete'){
$errormsg=__('We think you did it before!','wwm');
echo '<div class="wwm-errormessage" >'.$errormsg.'</div>';
}elseif((!$user_data->ID) ||get_usermeta($user_data->ID,'activate_key')!==$_GET['activate_key']){
$errormsg=__('Your activation key is not valid for the plan!','wwm');
echo '<div class="wwm-errormessage" >'.$errormsg.'</div>';



1:00 am on Apr 2, 2011 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Well, it's not the exact same wording as the message you are receiving but if this is it ...
}elseif((!$user_data->ID) ||get_usermeta($user_data->ID,'activate_key')!==$_GET['activate_key']){ 
$errormsg=__('Your activation key is not valid for the plan!','wwm');
echo '<div class="wwm-errormessage" >'.$errormsg.'</div>';

... then you can track back from here.


7:25 am on Apr 2, 2011 (gmt 0)

Yep that's the line causing the error. Potentially has to do with the activation key that is being sent but however not recognized when a user clicks on it.

Featured Threads

Hot Threads This Week

Hot Threads This Month