Fixed bug 2553 - truncate_userinfo() was out-of-sync with prefix_user table definition. Added a reminder to the SQL files.

This commit is contained in:
martinlanghoff 2005-02-15 23:12:57 +00:00
parent 4a57951a63
commit 1c66bf597d
3 changed files with 10 additions and 3 deletions

View File

@ -409,7 +409,9 @@ CREATE TABLE `prefix_sessions` (
# #
# Table structure for table `user` # Table structure for table `user`
# #
# When changing prefix_user, you may need to update
# truncate_userinfo() in moodlelib.php
#
CREATE TABLE `prefix_user` ( CREATE TABLE `prefix_user` (
`id` int(10) unsigned NOT NULL auto_increment, `id` int(10) unsigned NOT NULL auto_increment,
`auth` varchar(20) NOT NULL default 'manual', `auth` varchar(20) NOT NULL default 'manual',

View File

@ -276,7 +276,12 @@ CREATE TABLE prefix_cache_text (
CREATE INDEX prefix_cache_text_md5key_idx ON prefix_cache_text (md5key); CREATE INDEX prefix_cache_text_md5key_idx ON prefix_cache_text (md5key);
#
# Table structure for table `user`
#
# When updating field length, modify
# truncate_userinfo() in moodlelib.php
#
CREATE TABLE prefix_user ( CREATE TABLE prefix_user (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
auth varchar(20) NOT NULL default 'manual', auth varchar(20) NOT NULL default 'manual',

View File

@ -1786,7 +1786,7 @@ function truncate_userinfo($info) {
// define the limits // define the limits
$limit = array( $limit = array(
'username' => 100, 'username' => 100,
'idnumber' => 12, 'idnumber' => 64,
'firstname' => 20, 'firstname' => 20,
'lastname' => 20, 'lastname' => 20,
'email' => 100, 'email' => 100,