From decbf0f1ec0f924c51c5911f8447c027988f5d4b Mon Sep 17 00:00:00 2001
From: dougk_ff7
Date: Tue, 4 Jun 2002 04:14:17 +0000
Subject: [PATCH] Ok, several bug fixes here... The numbers are, 328, 340, 341,
344, 347, 351, 397, and 405.
The rest (that I have seen) will be fixed later.
-Doug
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@2619 89ea8834-ac86-4346-8a33-228a782c2dd0
---
phpBB/db/schemas/mssql_basic.sql | 2 +-
phpBB/db/schemas/mysql_schema.sql | 2 +-
phpBB/db/schemas/postgres_basic.sql | 2 +-
phpBB/includes/usercp_register.php | 10 ++++++++++
phpBB/install.php | 12 ++++++------
phpBB/templates/subSilver/overall_header.tpl | 2 +-
6 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/phpBB/db/schemas/mssql_basic.sql b/phpBB/db/schemas/mssql_basic.sql
index a81b04ee03..fb2dcbc81f 100644
--- a/phpBB/db/schemas/mssql_basic.sql
+++ b/phpBB/db/schemas/mssql_basic.sql
@@ -89,7 +89,7 @@ INSERT INTO phpbb_forums (forum_id, cat_id, forum_name, forum_desc, forum_status
Default Admin --> username: admin
password: admin (change this or remove it once everything is working!)
*/
-INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', '', '', '', '', 0, 0);
+INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', 0, '', '', '', 0, 0);
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 2, 'Admin', 1, 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);
diff --git a/phpBB/db/schemas/mysql_schema.sql b/phpBB/db/schemas/mysql_schema.sql
index a5e27e797c..750ad5cad9 100644
--- a/phpBB/db/schemas/mysql_schema.sql
+++ b/phpBB/db/schemas/mysql_schema.sql
@@ -42,7 +42,7 @@ CREATE TABLE phpbb_user_group (
# Table structure for table 'phpbb_groups'
#
CREATE TABLE phpbb_groups (
- group_id mediumint(8) NOT NULL,
+ group_id mediumint(8) NOT NULL auto_increment,
group_type tinyint(4) DEFAULT '1' NOT NULL,
group_name varchar(40) NOT NULL,
group_description varchar(255) NOT NULL,
diff --git a/phpBB/db/schemas/postgres_basic.sql b/phpBB/db/schemas/postgres_basic.sql
index 55b518b659..9aaec8547f 100644
--- a/phpBB/db/schemas/postgres_basic.sql
+++ b/phpBB/db/schemas/postgres_basic.sql
@@ -71,7 +71,7 @@ INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test cat
INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum.', 1, 10, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 1, 1, 1, 3);
-- Users
-INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', '', '', '', '', 0, 0);
+INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', 0, '', '', '', 0, 0);
-- username: admin password: admin (change this or remove it once everything is working!)
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 2, 'Admin', 1, 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);
diff --git a/phpBB/includes/usercp_register.php b/phpBB/includes/usercp_register.php
index 1299b5e8f3..89de28cf5b 100644
--- a/phpBB/includes/usercp_register.php
+++ b/phpBB/includes/usercp_register.php
@@ -203,6 +203,16 @@ if (
}
}
}
+//
+// Let's make sure the user isn't logged in while registering,
+// and ensure that they were trying to register a second time
+// (Prevents double registrations)
+//
+if ( $userdata['session_logged_in'] && $mode =="register" && $username == $userdata['username'])
+{
+ message_die(GENERAL_MESSAGE, $lang['Username_taken'], '', __LINE__, __FILE__);
+}
+
//
// Did the user submit? In this case build a query to update the users profile in the DB
diff --git a/phpBB/install.php b/phpBB/install.php
index 5cd46ef96f..b3e619347e 100644
--- a/phpBB/install.php
+++ b/phpBB/install.php
@@ -906,12 +906,12 @@ else
//
$config_data = ''; // Done this to prevent highlighting editors getting confused!
diff --git a/phpBB/templates/subSilver/overall_header.tpl b/phpBB/templates/subSilver/overall_header.tpl
index f7ebfb2775..c62256f52e 100644
--- a/phpBB/templates/subSilver/overall_header.tpl
+++ b/phpBB/templates/subSilver/overall_header.tpl
@@ -220,7 +220,7 @@ input.liteoption {
-
+