Implement RFE "Non Required Fields on User Registration". Associated upgrade.

Minor streamlining of profile field listing methods.

WebGUI::Operation::Profile::getRequiredProfileFields is now deprecated,
because it's specific enough to be not significantly more useful than
WebGUI::ProfileField::getRequiredFields, and because with this change
nothing in core uses it anymore.
This commit is contained in:
Drake 2006-11-22 23:50:00 +00:00
parent 2843dd195b
commit ca9d90c577
7 changed files with 106 additions and 43 deletions

View file

@ -15,6 +15,7 @@
- fix: A minor bug in the default viewPurchaseHistory template
- fix: Thread determination of "current" Post, and shortcuts to non-Thread Posts
- fix: make handling of profile field possible values slightly more robust
- RFE: non-required fields shown on user registration
7.2.1
- Made a change to version tag commits to deal with unusually long commit

View file

@ -21,6 +21,7 @@ my $quiet; # this line required
my $session = start(); # this line required
# upgrade functions go here
addProfileFieldsOnRegistration($session);
finish($session); # this line required
@ -53,6 +54,21 @@ sub start {
return $session;
}
#-------------------------------------------------
sub addProfileFieldsOnRegistration {
my $session = shift;
print "\tAdding showAtRegistration to userProfileField rows.\n" unless $quiet;
$session->db->write($_) for(<<'EOT',
ALTER TABLE userProfileField
ADD COLUMN showAtRegistration int(11) NOT NULL default '0'
EOT
<<'EOT',
UPDATE userProfileField SET showAtRegistration = required
EOT
);
}
#-------------------------------------------------
sub finish {
my $session = shift;