Limiting Blog Creation on WP sign up page

I have the setting in place in the Membership plugin to limit blog creation. I have a few levels setup where blog creation is the positive option. I would like the system to show a message (on the wp-signup.php page) when a user level has reached their limit. I researched a bit and put together the following:

<?php global $user;

$member = new M_Membership($user->ID);

if( $member->has_level_rule(‘blogcreation’:wink: && $member->pass_thru( ‘blogcreation’, array( ‘current_blog_count’ => false ) <= 1 ) ) { ?>

Upgrade message would go here

<?php }else{ ?>

<form id=”setupform” method=”post” action=”wp-signup.php”>

<input type=”hidden” name=”stage” value=”gimmeanotherblog” />

<?php do_action( ‘signup_hidden_fields’ ); ?>

<?php show_blog_form($blogname, $blog_title, $errors); ?>

<p class=”submit”><input type=”submit” name=”submit” class=”submit” value=”<?php esc_attr_e( ‘Create Site’ ) ?>” /></p>


<?php } ?>

I have tested this and it doesn’t seem to work. I have a level setup where it limits blog creation to 1 and using the code I have above, it continues to show the form and allow sign up. Please let me know what I should be doing to get this working correctly. Thank you.