I have a login hack for my DigiChat room, and it works great. Unfortunately, it also allows users awaiting email confirmation to still access the chat. Therefore, people can get in without even providing a valid email.
So, I'd like to know if there is a way to restrict access to only members in the Registered usergroup? At this point, I have my 'awaiting email confirmation' usergroup set up to not allow access to the forum at all, preventing them from getting in the chat. But I really don't want that as a permanent option. Can I add a usergroup variable to this and if so, what should it be?
Here is my code:
PHP Code:
<?php
if( $bbuserid ) {
$user = $DB_site->query_first( "SELECT username
FROM user
WHERE userid = $bbuserid" );
$bbuserinfo = $user[ username ];
print( "<APPLET align=middle code=\"com.diginet.digichat.client.DigiChatApplet\"
codeBase=\"http://host4.digichat.com/DigiChat/DigiClasses/\"
width=\"200\" height=\"100\" align=\"middle\" ARCHIVE=\"client.jar\" nickname=\"$username\">
<PARAM NAME=\"siteID\" VALUE=\"xxxx\">
<PARAM NAME=\"cabbase\" VALUE=\"Client.cab\">
<PARAM NAME=\"background\" VALUE=\"000000\">
<PARAM NAME=\"textcolor\" VALUE=\"ffffff\">
<param name=\"floodControl\" value=\"1000\">
<PARAM NAME=\"nickname\" VALUE=\"$bbuserinfo\">
<PARAM NAME=\"openProfileURL\" VALUE=\"true\">
<PARAM NAME=\"room\" VALUE=\"chat-room-name\">
Our Chat requires a Java Compatible web browser to run.
</APPLET>\n" );
} else {
print( "<BODY BGCOLOR=\"#000000\">
<CENTER>
<FONT FACE=\"verdana, arial\" size=\"2\" color=\"white\">
Sorry, you must be logged into the Forum to use Chat!</font><br>" );
} // end if
?>
Thanks