Cleaning Executive Officer (1976-2010)

WPMU:Cookie for Signup


Thursday, July 2nd, 2009

If you are using the Cookie for comment from Donncha and WordpressMU. Here are some tips for you. You may add a function to your blog signup. Just copy the code and paste into the plugin’s file.


function cfc_check_signup($result) {
$cfc_key = get_cfc_key();
if( !$cfc_key )
return $result;

if( !isset( $_COOKIE[ $cfc_key ] ) ) {
die( 'Sorry, you are not allowed to signup.' );
}
return $result;
}
add_filter( 'wpmu_validate_blog_signup', 'cfc_check_signup' );
add_filter( 'wpmu_validate_user_signup', 'cfc_check_signup' );

Leave a Reply

Comment moderation is enabled. Your comment may take some time to appear.