Ciao a tutti,
al fine di utilizzare un unico db per il forum e il mio sito, stò cercando di capire come funziona invision board... al momento di inviare le mail di conferma registrazione, ibb esegue la seguente routine:
//--------------------------------------
// Back to the usual programming!
//--------------------------------------
if ($HTTP_POST_VARS['member_name'] == "")
{
$std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_username' ) );
}
//------------------------------------------------------------
// Check for input and it's in a valid format.
//------------------------------------------------------------
$member_name = trim(strtolower($ibforums->input['member_name']));
if ($member_name == "")
{
$std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_username' ) );
}
//------------------------------------------------------------
// Attempt to get the user details from the DB
//------------------------------------------------------------
$DB->query("SELECT name, id, email, mgroup FROM ibf_members WHERE LOWER(name)='$member_name'");
if ( ! $DB->get_num_rows() )
{
$std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_such_user' ) );
}
else
{
$member = $DB->fetch_row();
//------------------------------------------------------------
// Is there a validation key? If so, we'd better not touch it
//------------------------------------------------------------
if ($member['id'] == "")
{
$std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_such_user' ) );
}
$validate_key = md5( $std->make_password() . time() );
Non riesco a capire la variabile $std cosa fà... infatti l'ultima variabile $validate_ket che contiene appunto il codice di abilitazione fa riferimento a questa variabile... ma non ci capisco molto... chi mi aiuta??? Grazie!