sf #1336414, protect all default user profile fields
This commit is contained in:
parent
1eff3f92fc
commit
ba1295aae5
1 changed files with 38 additions and 0 deletions
38
docs/upgrades/upgrade_6.7.7-6.7.8.pl
Normal file
38
docs/upgrades/upgrade_6.7.7-6.7.8.pl
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
use lib "../../lib";
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Asset;
|
||||
use WebGUI::Setting;
|
||||
|
||||
my $toVersion = "6.7.8";
|
||||
my $configFile;
|
||||
my $quiet;
|
||||
|
||||
start();
|
||||
protectUserProfileFields();
|
||||
finish();
|
||||
|
||||
#-------------------------------------------------
|
||||
sub start {
|
||||
$|=1; #disable output buffering
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile,
|
||||
'quiet'=>\$quiet
|
||||
);
|
||||
WebGUI::Session::open("../..",$configFile);
|
||||
WebGUI::Session::refreshUserInfo(3);
|
||||
WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")");
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub protectUserProfileFields {
|
||||
WebGUI::SQL->write("update userProfileField set protected=1 where fieldName in ('discussionLayout','INBOXNotifications','alias','signature','publicProfile','publicEmail','toolbar')");
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub finish {
|
||||
WebGUI::Session::close();
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue