From f2fe2f02558b0d1823d17a6354b92ae00df2b28e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 23 Oct 2003 15:31:10 +0000 Subject: - Bugfix: don't set a name and e-mail address for the anonymous user. Fixes bug #3740. --- update.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'update.php') diff --git a/update.php b/update.php index ef362324b..d504f4a7b 100644 --- a/update.php +++ b/update.php @@ -440,11 +440,11 @@ function _update_next_thread($structure, $parent) { function update_63() { if ($GLOBALS["db_type"] == "pgsql") { - update_sql("INSERT INTO {users} (uid, name, mail, timestamp) VALUES ('0', 'Anonymous', 'root@localhost', '". time() ."')"); + update_sql("INSERT INTO {users} (uid, name, mail, timestamp) VALUES ('0', '', '', '". time() ."')"); } else { update_sql("ALTER TABLE {users} CHANGE uid uid int(10) unsigned NOT NULL default '0'"); - update_sql("INSERT INTO {users} (uid, name, mail, timestamp) VALUES ('0', 'Anonymous', 'root@localhost', '". time() ."')"); + update_sql("INSERT INTO {users} (uid, name, mail, timestamp) VALUES ('0', '', '', '". time() ."')"); $users = db_result(db_query("SELECT MAX(uid) FROM {users};")); update_sql("INSERT INTO {sequences} (name, id) VALUES ('users_uid', '$users')"); } @@ -536,8 +536,10 @@ function update_69() { else { update_sql("ALTER TABLE {statistics} RENAME TO {node_counter}"); update_sql("ALTER TABLE {path} RENAME TO {url_alias}"); - update_sql("UPDATE {sequences} set name = '{url_alias}_pid' where name = '{path}_pid'"); + update_sql("UPDATE {sequences} SET name = '{url_alias}_pid' WHERE name = '{path}_pid'"); } + + update_sql("UPDATE {users} SET name = '' WHERE uid = 0;"); } /* -- cgit v1.2.3