diff --git a/docs/upgrades/upgrade_5.5.3-6.0.0.sql b/docs/upgrades/upgrade_5.5.3-6.0.0.sql
index 80311fecf..f875751d9 100644
--- a/docs/upgrades/upgrade_5.5.3-6.0.0.sql
+++ b/docs/upgrades/upgrade_5.5.3-6.0.0.sql
@@ -256,20 +256,28 @@ delete from international where languageId=1 and namespace='WebGUI' and internat
insert into international (internationalId,languageId,namespace,message,lastUpdated,context) values (1078,1,'WebGUI','There is already a user of this system with the email address you\'ve entered. Press \"Save\" if you still wish to create this user', 1067951807,NULL);
delete from international where languageId=1 and namespace='WebGUI' and internationalId=1077;
insert into international (internationalId,languageId,namespace,message,lastUpdated,context) values (1077,1,'WebGUI','The function you are attempting to call is not available for this authentication module', 1067951805,NULL);
-delete from template where namespace='Auth/WebGUI/Account' and templateId=1;
-INSERT INTO template (templateId,name,template,namespace) VALUES (1,'Default WebGUI Account Display Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n
\r\n\r\n\r\n','Auth/WebGUI/Account');
-delete from template where namespace='Auth/WebGUI/Create' and templateId=1;
-INSERT INTO template (templateId,name,template,namespace) VALUES (1,'Default WebGUI Anonymous Registration Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n\r\n | \r\n | \r\n
\r\n
\r\n\r\n\r\n\r\n','Auth/WebGUI/Create');
+
+
delete from template where namespace='Auth/WebGUI/Login' and templateId=1;
-INSERT INTO template (templateId,name,template,namespace) VALUES (1,'Default WebGUI Login Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n
\r\n\r\n\r\n\r\n
\r\n \r\n - \r\n
\r\n \r\n - \r\n
\r\n
\r\n
','Auth/WebGUI/Login');
+INSERT INTO template VALUES (1,'Default WebGUI Login Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n
\r\n\r\n\r\n\r\n
\r\n \r\n - \r\n
\r\n \r\n - \r\n
\r\n
\r\n
','Auth/WebGUI/Login');
+delete from template where namespace='Auth/WebGUI/Account' and templateId=1;
+INSERT INTO template VALUES (1,'Default WebGUI Account Display Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n
\r\n\r\n\r\n','Auth/WebGUI/Account');
+delete from template where namespace='Auth/WebGUI/Create' and templateId=1;
+INSERT INTO template VALUES (1,'Default WebGUI Anonymous Registration Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n\r\n | \r\n | \r\n
\r\n
\r\n\r\n\r\n\r\n','Auth/WebGUI/Create');
delete from template where namespace='Auth/WebGUI/Recovery' and templateId=1;
-INSERT INTO template (templateId,name,template,namespace) VALUES (1,'Default WebGUI Password Recovery Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n
\r\n\r\n\r\n\r\n','Auth/WebGUI/Recovery');
+INSERT INTO template VALUES (1,'Default WebGUI Password Recovery Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n
\r\n\r\n\r\n\r\n','Auth/WebGUI/Recovery');
delete from template where namespace='Auth/WebGUI/Expired' and templateId=1;
-INSERT INTO template (templateId,name,template,namespace) VALUES (1,'Default WebGUI Password Reset Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n \r\n | \r\n \r\n \r\n | \r\n
\r\n\r\n | \r\n \r\n | \r\n \r\n \r\n | \r\n
\r\n\r\n | \r\n \r\n | \r\n \r\n \r\n | \r\n
\r\n\r\n | \r\n \r\n \r\n | \r\n
\r\n
\r\n','Auth/WebGUI/Expired');
-delete from template where namespace='Auth/LDAP/Account' and templateId=1;
-INSERT INTO template (templateId,name,template,namespace) VALUES (1,'Default LDAP Account Display Template','\r\n \r\n\r\n\r\n\r\n\r\n
\r\n\r\n\r\n | \r\n \r\n | \r\n \r\n \r\n | \r\n
\r\n
\r\n\r\n','Auth/LDAP/Account');
-delete from template where namespace='Auth/LDAP/Create' and templateId=1;
-INSERT INTO template (templateId,name,template,namespace) VALUES (1,'Default LDAP Anonymous Registration Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n\r\n | \r\n | \r\n
\r\n
\r\n\r\n\r\n\r\n','Auth/LDAP/Create');
+INSERT INTO template VALUES (1,'Default WebGUI Password Reset Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n \r\n | \r\n \r\n \r\n | \r\n
\r\n\r\n | \r\n \r\n | \r\n \r\n \r\n | \r\n
\r\n\r\n | \r\n \r\n | \r\n \r\n \r\n | \r\n
\r\n\r\n | \r\n \r\n \r\n | \r\n
\r\n
\r\n','Auth/WebGUI/Expired');
delete from template where namespace='Auth/LDAP/Login' and templateId=1;
-INSERT INTO template (templateId,name,template,namespace) VALUES (1,'Default LDAP Login Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n
\r\n\r\n\r\n\r\n
\r\n \r\n - \r\n
\r\n \r\n - \r\n
\r\n
\r\n
','Auth/LDAP/Login');
+INSERT INTO template VALUES (1,'Default LDAP Login Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n
\r\n\r\n\r\n\r\n
\r\n \r\n - \r\n
\r\n \r\n - \r\n
\r\n
\r\n
','Auth/LDAP/Login');
+delete from template where namespace='Auth/LDAP/Account' and templateId=1;
+INSERT INTO template VALUES (1,'Default LDAP Account Display Template','\r\n \r\n\r\n\r\n\r\n\r\n
\r\n\r\n\r\n | \r\n \r\n | \r\n \r\n \r\n | \r\n
\r\n
\r\n\r\n\r\n','Auth/LDAP/Account');
+delete from template where namespace='Auth/LDAP/Create' and templateId=1;
+INSERT INTO template VALUES (1,'Default LDAP Anonymous Registration Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n\r\n | \r\n | \r\n
\r\n
\r\n\r\n\r\n\r\n','Auth/LDAP/Create');
+delete from template where namespace='Auth/SMB/Login' and templateId=1;
+INSERT INTO template VALUES (1,'Default SMB Login Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n
\r\n\r\n\r\n\r\n
\r\n \r\n - \r\n
\r\n \r\n - \r\n
\r\n
\r\n
','Auth/SMB/Login');
+delete from template where namespace='Auth/SMB/Account' and templateId=1;
+INSERT INTO template VALUES (1,'Default SMB Account Display Template','\r\n \r\n\r\n\r\n\r\n\r\n
\r\n\r\n\r\n | \r\n \r\n | \r\n \r\n \r\n | \r\n
\r\n
\r\n\r\n','Auth/SMB/Account');
+delete from template where namespace='Auth/SMB/Create' and templateId=1;
+INSERT INTO template VALUES (1,'Default SMB Anonymous Registration Template','\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n | \r\n | \r\n
\r\n\r\n\r\n | \r\n | \r\n
\r\n\r\n\r\n | \r\n | \r\n
\r\n
\r\n\r\n\r\n\r\n','Auth/SMB/Create');
#End Authentication Changes
\ No newline at end of file
diff --git a/lib/WebGUI/Auth.pm b/lib/WebGUI/Auth.pm
index 66e536285..f1b8fe7bb 100644
--- a/lib/WebGUI/Auth.pm
+++ b/lib/WebGUI/Auth.pm
@@ -34,7 +34,8 @@ use WebGUI::Template;
use WebGUI::URL;
use WebGUI::Utility;
use WebGUI::Operation::Profile;
-use WebGUI::Operation::Auth;
+use WebGUI::Operation::Shared;
+
=head1 NAME
@@ -316,7 +317,7 @@ sub displayAccount {
$vars->{'account.form.submit'} = WebGUI::Form::submit({});
$vars->{'account.form.footer'} = "";
- $vars->{'account.options'} = WebGUI::Operation::Profile::accountOptions();
+ $vars->{'account.options'} = WebGUI::Operation::Shared::accountOptions();
return WebGUI::Template::process(WebGUI::Template::get(1,$template), $vars);
}
diff --git a/lib/WebGUI/Auth/LDAP.pm b/lib/WebGUI/Auth/LDAP.pm
index d01a4374d..4fb0ce150 100644
--- a/lib/WebGUI/Auth/LDAP.pm
+++ b/lib/WebGUI/Auth/LDAP.pm
@@ -19,6 +19,7 @@ use WebGUI::Mail;
use WebGUI::Session;
use WebGUI::SQL;
use WebGUI::Utility;
+use WebGUI::Operation::Shared;
use URI;
use Net::LDAP;
@@ -260,7 +261,7 @@ sub displayAccount {
$vars->{'account.form.karma'} = $session{user}{karma};
$vars->{'account.form.karma.label'} = WebGUI::International::get(537);
}
- $vars->{'account.options'} = WebGUI::Operation::Profile::accountOptions();
+ $vars->{'account.options'} = WebGUI::Operation::Shared::accountOptions();
return WebGUI::Template::process(WebGUI::Template::get(1,'Auth/LDAP/Account'), $vars);
}
diff --git a/lib/WebGUI/Auth/SMB.pm b/lib/WebGUI/Auth/SMB.pm
index bd8aba47a..70146a2e1 100644
--- a/lib/WebGUI/Auth/SMB.pm
+++ b/lib/WebGUI/Auth/SMB.pm
@@ -168,7 +168,7 @@ sub displayAccount {
$vars->{'account.form.karma'} = $session{user}{karma};
$vars->{'account.form.karma.label'} = WebGUI::International::get(537);
}
- $vars->{'account.options'} = WebGUI::Operation::Profile::accountOptions();
+ $vars->{'account.options'} = WebGUI::Operation::Shared::accountOptions();
return WebGUI::Template::process(WebGUI::Template::get(1,'Auth/SMB/Account'), $vars);
}
diff --git a/lib/WebGUI/Operation/Shared.pm b/lib/WebGUI/Operation/Shared.pm
index 63c4cd014..beb54224a 100644
--- a/lib/WebGUI/Operation/Shared.pm
+++ b/lib/WebGUI/Operation/Shared.pm
@@ -20,6 +20,49 @@ use WebGUI::SQL;
our @ISA = qw(Exporter);
our @EXPORT = qw(&menuWrapper);
+#-------------------------------------------------------------------
+ sub accountOptions {
+ my @array;
+ if (WebGUI::Privilege::isInGroup(4) || WebGUI::Privilege::isInGroup(5) || WebGUI::Privilege::isInGroup(6) || WebGUI::Privilege::isInGroup(8) || WebGUI::Privilege::isInGroup(9) || WebGUI::Privilege::isInGroup(10) || WebGUI::Privilege::isInGroup(11)) {
+ my %hash;
+ if ($session{var}{adminOn}) {
+ $hash{'options.display'} .= ''.WebGUI::International::get(12).'';
+ } else {
+ $hash{'options.display'} .= ''.WebGUI::International::get(63).'';
+ }
+ push(@array,\%hash);
+ }
+ unless ($session{form}{op} eq "displayAccount"){
+ my %hash;
+ $hash{'options.display'} = ''.WebGUI::International::get(342).'';
+ push(@array,\%hash);
+ }
+ unless ($session{form}{op} eq "editProfile"){
+ my %hash;
+ $hash{'options.display'} = ''.WebGUI::International::get(341).'';
+ push(@array,\%hash);
+ }
+ unless ($session{form}{op} eq "viewProfile"){
+ my %hash;
+ $hash{'options.display'} = ''.WebGUI::International::get(343).'';
+ push(@array,\%hash);
+ }
+ unless ($session{form}{op} eq "viewMessageLog"){
+ my %hash;
+ $hash{'options.display'} = ''.WebGUI::International::get(354).'';
+ push(@array,\%hash);
+ }
+ my %logout;
+ $logout{'options.display'} = ''.WebGUI::International::get(64).'';
+ push(@array,\%logout);
+ if ($session{setting}{selfDeactivation} && !WebGUI::Privilege::isInGroup(3)){
+ my %hash;
+ $hash{'options.display'} = ''.WebGUI::International::get(65).'';
+ push(@array,\%hash);
+ }
+ return \@array;
+}
+
#-------------------------------------------------------------------
sub menuWrapper {
my ($output, $key);