Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hello
- here's a quick tutorial that will make easier the management of user accounts between phpBB3 and arcemu
- Operation of the script:
- When a new user will create an account on your phpbb3 it'll automatically create your database but will be deactivated arcemu.
- To activate the new user must identify on your phpbb3 (this method was chosen for reasons of securitées).
- If your users change their password or email phpbb3 shalt update your database arcemu.
- -------------------------------------------------- ---------------------------------------------
- Prerequisite:
- Utilsier php5 minimum charset php must be UTF-8.
- Your web server (tested on Apache) should also have the charset to UTF-8.
- Your phpbb3 must:
- Use the account validation email.
- The administrator logs must be enabled.
- Your users should not change the nickname does not support script
- -------------------------------------------------- ---------------------------------------------
- Open:
- phpbb3/config.php
- Then look for:
- $ Load_extensions ='';
- After add
- $ Sql_server_host = "adresse_ip_de_votre_serveur_sql";
- $ Sql_server_user = "login_de_votre_serveur_sql";
- $ Sql_server_pass = "password_de_votre_serveur_sql";
- Close config.php
- -------------------------------------------------- -----------------------
- Open:
- phpbb3/includes/functions.php
- Search:
- Reapply_sid $ redirect = ($ redirect);
- After add
- if ($ user-> data ['user_lastvisit'] == 0)
- (
- Server_userlogin $ = $ user-> data ['username'];
- $ Sql = "UPDATE accounts SET banned = '0 'WHERE login =' $ server_userlogin";
- $ Result = mysql_query ($ sql, sql_server_connect (realm));
- )
- UPDATE: watched this line $ result = mysql_query ($ sql, sql_server_connect ('realm'));
- REALM by replacing the name of your sql database containing the accounts
- Then look at the very end:
- ?>
- Before add:
- sql_server_connect function ($ sql_server_db) (
- global $ sql_server_host, $ sql_server_user, $ sql_server_pass;
- $ Sql_cont = mysql_connect ($ sql_server_host, $ sql_server_user, $ sql_server_pass) or die (mysql_error ());
- mysql_select_db ($ sql_server_db, $ sql_cont) or die (mysql_error ());
- return $ sql_cont;
- )
- Close functions.php
- -------------------------------------------------- -----------------------
- Open:
- phpbb3/includes/ucp/ucp_register.php
- Then look for:
- $ User_id = user_add ($ user_row, $ cp_data);
- After add
- Server_userlogin $ = $ data ['username'];
- Server_userpass $ = $ data ['new_password'];
- $ Server_userencodpass = sha1 (strtoupper ($ server_userlogin ).":". strtoupper ($ server_userpass));
- Server_usermail $ = $ data ['email'];
- $ = $ Server_userip user_row ['user_ip'];
- $ Sql = "INSERT INTO accounts (login, password, encrypted_password, gm, banned, email, flags, lastip)
- VALUES ('$ server_userlogin', '$ server_userpass',' $ server_userencodpass', '0 ', '1', '$ server_usermail', '8 ',' $ server_userip ') ";
- $ Result = mysql_connect ($ sql, sql_server_connect (realm));
- UPDATE: watched this line $ result = mysql_query ($ sql, sql_server_connect ('realm'));
- REALM by replacing the name of your sql database containing the accounts
- Close ucp_register.php
- -------------------------------------------------- -----------------------
- Open:
- phpbb3/includes/ucp/ucp_profile.php
- Then look for:
- add_log ('user', $ user-> data ['user_id'], 'LOG_USER_NEW_PASSWORD', $ data ['username']);
- After add
- Server_userlogin $ = $ data ['username'];
- Server_userpass $ = $ data ['new_password'];
- $ Server_userencodpass = sha1 (strtoupper ($ server_userlogin ).":". strtoupper ($ server_userpass));
- $ Sql = "UPDATE accounts SET password = '$ server_userpass' encrypted_password =' $ server_userencodpass' WHERE login = '$ server_userlogin";
- $ Result = mysql_query ($ sql, sql_server_connect ('realm'));
- UPDATE: watched this line $ result = mysql_query ($ sql, sql_server_connect ('realm'));
- REALM by replacing the name of your sql database containing the accounts
- Then look for:
- add_log ('user', $ user-> data ['user_id'], 'LOG_USER_UPDATE_EMAIL', $ data ['username'], $ user-> data ['user_email'], $ data ['email']);
- After add
- Server_userlogin $ = $ data ['username'];
- Server_usermail $ = $ data ['email'];
- $ Sql = "UPDATE accounts SET email = '$ server_usermail' WHERE login = '$ server_userlogin";
- $ Result = mysql_query ($ sql, sql_server_connect ('realm'));
- UPDATE: watched this line $ result = mysql_query ($ sql, sql_server_connect ('realm'));
- REALM by replacing the name of your sql database containing the accounts
- Close ucp_profile.php
- -------------------------------------------------- -----------------------
- Voila you're done.
- In case of problems post or other errors.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement