ich habe ein kleines Problem. Und zwar möchte ich, dass meine User, die sich über die Hauptseite https://sub.domain.tld/ einloggen auch direkt im Forum https://sub.domain.tld/forum/ eingeloggt werden. Ich habe hierfür auch ein wunderbares Script gefunden, welches mir das ermöglichen soll. Ich bin dabei der folgenden Anleitung gefolgt: https://developer-blog.net/phpbb-automa ... ner-seite/
Das ist das Resultat:
Code: Alles auswählen
$phpbb_root_path = 'forum/';
if($phpbb_root_path != '') {
define('IN_PHPBB', true);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include_once($phpbb_root_path . 'common.'.$phpEx);
include_once($phpbb_root_path . 'includes/functions_user.'.$phpEx);
}
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$username_phpbb = request_var('username', $row->forum_username);
$password_phpbb = request_var('password', $row->forum_passwort);
if(isset($username_phpbb) && isset($password_phpbb)) {
$result=$auth->login($username_phpbb, $password_phpbb, true);
if ($result['status'] == LOGIN_SUCCESS) {
echo "You're logged in";
} else {
echo $user->lang[$result['error_msg']];
}
}
Vielen Dank schon mal im voraus.
