if (is_member_of($bbuserinfo, 25)) { echo 'Sorry, you are already part of a usergroup'; } else { Code 2 make user a part of a usergroup }