Seite 1 von 1

eigene Registrationsseite in phpBB3

Verfasst: 08.07.2009 15:11
von PHProgrammierer
Hallo,
Ich bin gerade dabei mir selbst eine registrationsseite für mein forum zu proggen.
nun stehe ich vor einem Problem bei der Passwortverschlüsselung im phpBB.
ich weiß das es mit md5 und salts gemacht wird aber die md5 verschlüsselung sieht nicht annähernd so aus wie das passwort in der datenbank steht.
ich habe mir einen test user(name: test, passwort: tester) angelegt und tester mit md5 verschlüsselt... Ergebnis: f5d1278e8109edd94e1e4197e04873b9 in der datenbank steht aber: $H$7miyBWoPZl2xy/mW/BvQi/xcJ9ug4// ...
ich sehe auch noch eine zeile mit user_form_salt welche wieder etwas anderes enthält.
und auch noch: kann mir jemand die datenbank-tabelle: phpBB_users erklären?
das sind alle zeilen darin:
user_id user_type group_id user_permissions user_perm_from user_ip user_regdate username username_clean user_password user_passchg user_pass_convert user_email user_email_hash user_birthday user_lastvisit user_lastmark user_lastpost_time user_lastpage user_last_confirm_key user_last_search user_warnings user_last_warning user_login_attempts user_inactive_reason user_inactive_time user_posts user_lang user_timezone user_dst user_dateformat user_style user_rank user_colour user_new_privmsg user_unread_privmsg user_last_privmsg user_message_rules user_full_folder user_emailtime user_topic_show_days user_topic_sortby_type user_topic_sortby_dir user_post_show_days user_post_sortby_type user_post_sortby_dir user_notify user_notify_pm user_notify_type user_allow_pm user_allow_viewonline user_allow_viewemail user_allow_massemail user_options user_avatar user_avatar_type user_avatar_width user_avatar_height user_sig user_sig_bbcode_uid user_sig_bbcode_bitfield user_from user_icq user_aim user_yim user_msnm user_jabber user_website user_occ user_interests user_actkey user_newpasswd user_form_salt
welche davon muss ich ausfüllen (lassen) und welche nicht???
ich will, wie gesagt eine registration(so ähnlich wie beim normalen phpBB) nachbauen.
PS.: Habe phpBB3 aber das ist ja klar in diesem forum :grin:

bitte um hilfe,
PHProgrammierer

Re: eigene Registrationsseite in phpBB3

Verfasst: 08.07.2009 15:32
von Mahony
Hallo Schau mal hier http://www.phpbb.de/community/viewtopic ... 1#p1115241


Grüße: Mahony

Re: eigene Registrationsseite in phpBB3

Verfasst: 08.07.2009 17:05
von PHProgrammierer
ahh, danke. :D
weißt du ich bin neu hier im forum, da hab ich den beitrag übersehen, sorry.
ich werd ihn mir mal ansehen...

EDIT:
Zuerst hats nicht funktioniert...
ich habe die fehlermeldung von PHP ausgebessert:

Code: Alles auswählen

<?
define('IN_PHPBB', true);
$phpbb_root_path = '../Forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
require($phpbb_root_path .'includes/functions_user.php');


    global $phpbb_root_path;
    global $phpEx;
    global $db;
    global $config;
    global $user;
    global $auth;
    global $cache;
    global $template;


$user->session_begin();
$auth->acl($user->data);
$user->setup();



    $user_row = array(
    'username' => $username,
    'user_password' => $password, 
    'user_email' => $email,
    'group_id' => '2',
    'user_timezone' => '1.00',
    'user_dst' => '0',
    'user_lang' => 'de_x_sie',
    'user_type' => '0',
    'user_actkey' => '',
    'user_dateformat' => 'd M Y H:i',
    'user_style' => '1',
    'user_regdate' => time(),
    );


    if($phpbb_user_id = user_add($user_row)){
    echo "O.K!";
    }
    else
    {
    echo "nicht O.K!";
    }
?>
nun kommt eine Fehlermeldung von phpBB:
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1006: Cannot modify header information - headers already sent by (output started at ...:1)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1006: Cannot modify header information - headers already sent by (output started at ...:1)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1006: Cannot modify header information - headers already sent by (output started at ...:1)
nicht O.K!

Re: eigene Registrationsseite in phpBB3

Verfasst: 08.07.2009 19:32
von Mahony
Hallo
Du hast sicher ein Leerzeichen am Anfang der Datei (also noch vor <?php ).
Ansonsten schau auch mal hier http://www.phpbb.de/kb/headers_already_sent


Grüße: Mahony

Re: eigene Registrationsseite in phpBB3

Verfasst: 08.07.2009 20:19
von PHProgrammierer
aso ja das kann sein...
aber das macht doch nichts, außer bei session start.. oder???
das ist das gesamte script:

Code: Alles auswählen

<form method="POST" action="<? echo $PHP_SELF; ?>"> 
        <label>Benutzername:</label><input name="name" type="text"><br> 
        <label>Passwort: </label><input name="password" type="password"><br> 
        <label>Email-Adresse: </label><input name="email" type="text"><br> 
        <input name="register" type="submit" id="register" value="Registrieren"> 
    </form>

<?php   
if (isset($_POST['register'])) 
{ 

/*Variablen einlesen*/
$username=$_POST['name'];
$password=md5($_POST['password']);
$email=$_POST['mail'];

/*Im Forum registrieren*/

define('IN_PHPBB', true);
$phpbb_root_path = '../Forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
require($phpbb_root_path .'includes/functions_user.php');


    global $phpbb_root_path;
    global $phpEx;
    global $db;
    global $config;
    global $user;
    global $auth;
    global $cache;
    global $template;


$user->session_begin();
$auth->acl($user->data);
$user->setup();






  
    
    

    $user_row = array(
    'username' => $username,
    'user_password' => $password, 
    'user_email' => $email,
    'group_id' => '2',
    'user_timezone' => '1.00',
    'user_dst' => '0',
    'user_lang' => 'de_x_sie',
    'user_type' => '0',
    'user_actkey' => '',
    'user_dateformat' => 'd M Y H:i',
    'user_style' => '1',
    'user_regdate' => time(),
    );


    if($phpbb_user_id = user_add($user_row)){
    echo " ";
    }
    else
    {
    echo "Konnte nicht im Forum registrieren!";
    }
}
else {
echo ' ';
}
   ?>
oder muss ich dann das php-script davor schreiben??

EDIT:
Hab ich jetzt gemacht...
Jetzt kommt einfach die meldung: Konnte nicht im Forum registrieren!

Re: eigene Registrationsseite in phpBB3

Verfasst: 11.07.2009 01:03
von Mahony
Hallo
Schau auch mal hier http://www.phpbb.de/community/viewtopic ... 96#p964596

Grüße: Mahony