Sorry, I speak a little english.
I would like use login page email address and password combination, not username and password combination for auth. How to?
<?php
require_once("forum/SSI.php");
if ($context['user']['is_logged']) {
header ( 'location: http://localhost/forum' ); // logged
} else {
if ( isset ( $_POST [ 'login' ] ) ) {
if ( /* check the $_POST [ 'email' ] and $_POST [ 'pw' ] */ ) {
// login
header ( 'location: http://localhost/forum' );
} else {
print 'error email or/and password fields';
}
}
print '<form method="post" name="login">
<input type="text" name="email">
<input type="password" name="pw">
<input type="submit" name="login">
</form>';
}
?>
My forum is protected/private and I use it is the Settings.php file:
<?php
$ssi_guest_access = true;
This is why you're supposed to be using SMF's own login form because SMF will already accept either quite happily, and this is why you use ssi_login() to do it.