mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
New user field called "emailstop" ... to stop emails.
I had to do it ... this is driving me nuts with some people on moodle.org
This commit is contained in:
parent
017b4cab3e
commit
8199e3f09a
7 changed files with 15 additions and 1 deletions
|
@ -712,6 +712,7 @@
|
|||
fwrite ($bf,full_tag("FIRSTNAME",4,false,$user_data->firstname));
|
||||
fwrite ($bf,full_tag("LASTNAME",4,false,$user_data->lastname));
|
||||
fwrite ($bf,full_tag("EMAIL",4,false,$user_data->email));
|
||||
fwrite ($bf,full_tag("EMAILSTOP",4,false,$user_data->emailstop));
|
||||
fwrite ($bf,full_tag("ICQ",4,false,$user_data->icq));
|
||||
fwrite ($bf,full_tag("PHONE1",4,false,$user_data->phone1));
|
||||
fwrite ($bf,full_tag("PHONE2",4,false,$user_data->phone2));
|
||||
|
|
|
@ -2029,6 +2029,9 @@
|
|||
case "EMAIL":
|
||||
$this->info->tempuser->email = $this->getContents();
|
||||
break;
|
||||
case "EMAILSTOP":
|
||||
$this->info->tempuser->emailstop = $this->getContents();
|
||||
break;
|
||||
case "ICQ":
|
||||
$this->info->tempuser->icq = $this->getContents();
|
||||
break;
|
||||
|
|
|
@ -699,6 +699,10 @@ function main_upgrade($oldversion=0) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($oldversion < 2004022000) {
|
||||
table_column("user", "", "emailstop", "integer", "1", "unsigned", "0", "not null", "email");
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
|
|
@ -309,6 +309,7 @@ CREATE TABLE `prefix_user` (
|
|||
`firstname` varchar(20) NOT NULL default '',
|
||||
`lastname` varchar(20) NOT NULL default '',
|
||||
`email` varchar(100) NOT NULL default '',
|
||||
`emailstop` tinyint(1) unsigned NOT NULL default '0',
|
||||
`icq` varchar(15) default NULL,
|
||||
`phone1` varchar(20) default NULL,
|
||||
`phone2` varchar(20) default NULL,
|
||||
|
|
|
@ -444,6 +444,10 @@ function main_upgrade($oldversion=0) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($oldversion < 2004022000) {
|
||||
table_column("user", "", "emailstop", "integer", "1", "unsigned", "0", "not null", "email");
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
|
|
@ -199,6 +199,7 @@ CREATE TABLE prefix_user (
|
|||
firstname varchar(20) NOT NULL default '',
|
||||
lastname varchar(20) NOT NULL default '',
|
||||
email varchar(100) NOT NULL default '',
|
||||
emailstop integer NOT NULL default '0',
|
||||
icq varchar(15) default NULL,
|
||||
phone1 varchar(20) default NULL,
|
||||
phone2 varchar(20) default NULL,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// database to determine whether upgrades should
|
||||
// be performed (see lib/db/*.php)
|
||||
|
||||
$version = 2004021700; // The current version is a date (YYYYMMDDXX)
|
||||
$version = 2004022000; // The current version is a date (YYYYMMDDXX)
|
||||
|
||||
$release = "1.2 development"; // User-friendly version number
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue