switched over old auth links to the new url system
This commit is contained in:
parent
a3a335486a
commit
12ea0cf6fa
8 changed files with 24 additions and 56 deletions
|
|
@ -16,6 +16,9 @@
|
||||||
Matt Wilson for inspiration.
|
Matt Wilson for inspiration.
|
||||||
- Thumbnails will now be generated a little sharper. Thanks to Nuba.
|
- Thumbnails will now be generated a little sharper. Thanks to Nuba.
|
||||||
- SSL is now more strictly enforced.
|
- SSL is now more strictly enforced.
|
||||||
|
- Deleted the long since deprecated authentication methods (logout, login,
|
||||||
|
displayAccount, displayLogin, recoverPassword). If you don't understand
|
||||||
|
this, don't worry about it, you'll still be able to log in to your site. =)
|
||||||
- Fixed resetting votes on Poll would crash it.
|
- Fixed resetting votes on Poll would crash it.
|
||||||
- Fixed not being able to set display title and other yes no questions to no.
|
- Fixed not being able to set display title and other yes no questions to no.
|
||||||
- Fixed a bug where URLs would become unreachable when using SSL.
|
- Fixed a bug where URLs would become unreachable when using SSL.
|
||||||
|
|
|
||||||
|
|
@ -400,7 +400,7 @@ sub displayLogin {
|
||||||
$vars->{'login.form.submit'} = WebGUI::Form::submit({"value"=>WebGUI::International::get(52)});
|
$vars->{'login.form.submit'} = WebGUI::Form::submit({"value"=>WebGUI::International::get(52)});
|
||||||
$vars->{'login.form.footer'} = WebGUI::Form::formFooter();
|
$vars->{'login.form.footer'} = WebGUI::Form::formFooter();
|
||||||
$vars->{'anonymousRegistration.isAllowed'} = ($session{setting}{anonymousRegistration});
|
$vars->{'anonymousRegistration.isAllowed'} = ($session{setting}{anonymousRegistration});
|
||||||
$vars->{'createAccount.url'} = WebGUI::URL::page('op=createAccount');
|
$vars->{'createAccount.url'} = WebGUI::URL::page('op=auth&method=createAccount');
|
||||||
$vars->{'createAccount.label'} = WebGUI::International::get(67);
|
$vars->{'createAccount.label'} = WebGUI::International::get(67);
|
||||||
return WebGUI::Asset::Template->new($self->getLoginTemplateId)->process($vars);
|
return WebGUI::Asset::Template->new($self->getLoginTemplateId)->process($vars);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ sub createAccount {
|
||||||
$vars->{'create.form.passwordConfirm.label'} = WebGUI::International::get(2,'AuthWebGUI');
|
$vars->{'create.form.passwordConfirm.label'} = WebGUI::International::get(2,'AuthWebGUI');
|
||||||
$vars->{'create.form.hidden'} = WebGUI::Form::hidden({"name"=>"confirm","value"=>$session{form}{confirm}});
|
$vars->{'create.form.hidden'} = WebGUI::Form::hidden({"name"=>"confirm","value"=>$session{form}{confirm}});
|
||||||
$vars->{'recoverPassword.isAllowed'} = $self->getSetting("passwordRecovery");
|
$vars->{'recoverPassword.isAllowed'} = $self->getSetting("passwordRecovery");
|
||||||
$vars->{'recoverPassword.url'} = WebGUI::URL::page('op=recoverPassword');
|
$vars->{'recoverPassword.url'} = WebGUI::URL::page('op=auth&method=recoverPassword');
|
||||||
$vars->{'recoverPassword.label'} = WebGUI::International::get(59);
|
$vars->{'recoverPassword.label'} = WebGUI::International::get(59);
|
||||||
return $self->SUPER::createAccount("createAccountSave",$vars);
|
return $self->SUPER::createAccount("createAccountSave",$vars);
|
||||||
}
|
}
|
||||||
|
|
@ -286,7 +286,7 @@ sub displayLogin {
|
||||||
return $self->displayAccount($_[0]) if ($self->userId != 1);
|
return $self->displayAccount($_[0]) if ($self->userId != 1);
|
||||||
$vars->{'login.message'} = $_[0] if ($_[0]);
|
$vars->{'login.message'} = $_[0] if ($_[0]);
|
||||||
$vars->{'recoverPassword.isAllowed'} = $self->getSetting("passwordRecovery");
|
$vars->{'recoverPassword.isAllowed'} = $self->getSetting("passwordRecovery");
|
||||||
$vars->{'recoverPassword.url'} = WebGUI::URL::page('op=recoverPassword');
|
$vars->{'recoverPassword.url'} = WebGUI::URL::page('op=auth&method=recoverPassword');
|
||||||
$vars->{'recoverPassword.label'} = WebGUI::International::get(59);
|
$vars->{'recoverPassword.label'} = WebGUI::International::get(59);
|
||||||
return $self->SUPER::displayLogin("login",$vars);
|
return $self->SUPER::displayLogin("login",$vars);
|
||||||
}
|
}
|
||||||
|
|
@ -501,7 +501,7 @@ sub recoverPassword {
|
||||||
$vars->{'login.label'} = WebGUI::International::get(58);
|
$vars->{'login.label'} = WebGUI::International::get(58);
|
||||||
|
|
||||||
$vars->{'anonymousRegistration.isAllowed'} = ($session{setting}{anonymousRegistration});
|
$vars->{'anonymousRegistration.isAllowed'} = ($session{setting}{anonymousRegistration});
|
||||||
$vars->{'createAccount.url'} = WebGUI::URL::page('op=createAccount');
|
$vars->{'createAccount.url'} = WebGUI::URL::page('op=auth=&method=createAccount');
|
||||||
$vars->{'createAccount.label'} = WebGUI::International::get(67);
|
$vars->{'createAccount.label'} = WebGUI::International::get(67);
|
||||||
$vars->{'recover.message'} = $_[0] if ($_[0]);
|
$vars->{'recover.message'} = $_[0] if ($_[0]);
|
||||||
$vars->{'recover.form.email'} = WebGUI::Form::text({"name"=>"email"});
|
$vars->{'recover.form.email'} = WebGUI::Form::text({"name"=>"email"});
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ use WebGUI::URL;
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
sub _createURL {
|
sub _createURL {
|
||||||
return '<a href="'.WebGUI::URL::page("op=logout").'">'.$_[0].'</a>';
|
return '<a href="'.WebGUI::URL::page("op=auth&method=logout").'">'.$_[0].'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
@ -32,8 +32,8 @@ sub process {
|
||||||
$var{'customText'} = $param[1];
|
$var{'customText'} = $param[1];
|
||||||
$var{'customText'} =~ s/%(.*?)%/_createURL($1)/ge;
|
$var{'customText'} =~ s/%(.*?)%/_createURL($1)/ge;
|
||||||
$var{'hello.label'} = WebGUI::International::get(48);
|
$var{'hello.label'} = WebGUI::International::get(48);
|
||||||
$var{'logout.url'} = WebGUI::URL::page("op=logout");
|
$var{'logout.url'} = WebGUI::URL::page("op=auth&method=logout");
|
||||||
$var{'account.display.url'} = WebGUI::URL::page('op=displayAccount');
|
$var{'account.display.url'} = WebGUI::URL::page('op=auth&method=displayAccount');
|
||||||
$var{'logout.label'} = WebGUI::International::get(49);
|
$var{'logout.label'} = WebGUI::International::get(49);
|
||||||
my $boxSize = $param[0];
|
my $boxSize = $param[0];
|
||||||
$boxSize = 12 unless $boxSize;
|
$boxSize = 12 unless $boxSize;
|
||||||
|
|
@ -48,6 +48,10 @@ sub process {
|
||||||
$var{'form.header'} = WebGUI::Form::formHeader({action=>$action})
|
$var{'form.header'} = WebGUI::Form::formHeader({action=>$action})
|
||||||
.WebGUI::Form::hidden({
|
.WebGUI::Form::hidden({
|
||||||
name=>"op",
|
name=>"op",
|
||||||
|
value=>"auth"
|
||||||
|
})
|
||||||
|
.WebGUI::Form::hidden({
|
||||||
|
name=>"method",
|
||||||
value=>"login"
|
value=>"login"
|
||||||
});
|
});
|
||||||
$var{'username.label'} = WebGUI::International::get(50);
|
$var{'username.label'} = WebGUI::International::get(50);
|
||||||
|
|
@ -66,7 +70,7 @@ sub process {
|
||||||
value=>WebGUI::International::get(52),
|
value=>WebGUI::International::get(52),
|
||||||
extras=>'class="loginBoxButton"'
|
extras=>'class="loginBoxButton"'
|
||||||
});
|
});
|
||||||
$var{'account.create.url'} = WebGUI::URL::page('op=createAccount');
|
$var{'account.create.url'} = WebGUI::URL::page('op=auth&method=createAccount');
|
||||||
$var{'account.create.label'} = WebGUI::International::get(407);
|
$var{'account.create.label'} = WebGUI::International::get(407);
|
||||||
$var{'form.footer'} = WebGUI::Form::formFooter();
|
$var{'form.footer'} = WebGUI::Form::formFooter();
|
||||||
return WebGUI::Asset::Template->new($templateId)->process(\%var);
|
return WebGUI::Asset::Template->new($templateId)->process(\%var);
|
||||||
|
|
|
||||||
|
|
@ -24,12 +24,12 @@ sub process {
|
||||||
my $logout = $param[1] || WebGUI::International::get(717);
|
my $logout = $param[1] || WebGUI::International::get(717);
|
||||||
my %var;
|
my %var;
|
||||||
if ($session{user}{userId} eq '1') {
|
if ($session{user}{userId} eq '1') {
|
||||||
return WebGUI::URL::page("op=displayLogin") if ($param[0] eq "linkonly");
|
return WebGUI::URL::page("op=auth&method=init") if ($param[0] eq "linkonly");
|
||||||
$var{'toggle.url'} = WebGUI::URL::page('op=displayLogin');
|
$var{'toggle.url'} = WebGUI::URL::page('op=auth&method=init');
|
||||||
$var{'toggle.text'} = $login;
|
$var{'toggle.text'} = $login;
|
||||||
} else {
|
} else {
|
||||||
return WebGUI::URL::page("op=logout") if ($param[0] eq "linkonly");
|
return WebGUI::URL::page("op=auth&method=logout") if ($param[0] eq "linkonly");
|
||||||
$var{'toggle.url'} = WebGUI::URL::page('op=logout');
|
$var{'toggle.url'} = WebGUI::URL::page('op=auth&method=logout');
|
||||||
$var{'toggle.text'} = $logout;
|
$var{'toggle.text'} = $logout;
|
||||||
}
|
}
|
||||||
if ($param[3]) {
|
if ($param[3]) {
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ use WebGUI::URL;
|
||||||
sub process {
|
sub process {
|
||||||
my %var;
|
my %var;
|
||||||
my @param = WebGUI::Macro::getParams(shift);
|
my @param = WebGUI::Macro::getParams(shift);
|
||||||
return WebGUI::URL::page("op=displayAccount") if ($param[0] eq "linkonly");
|
return WebGUI::URL::page("op=auth&method=init") if ($param[0] eq "linkonly");
|
||||||
$var{'account.url'} = WebGUI::URL::page('op=displayAccount');
|
$var{'account.url'} = WebGUI::URL::page('op=auth&method=init');
|
||||||
$var{'account.text'} = $param[0] || WebGUI::International::get(46);
|
$var{'account.text'} = $param[0] || WebGUI::International::get(46);
|
||||||
return WebGUI::Asset::Template->newByUrl($param[1]||"default_account_macro")->process(\%var);
|
return WebGUI::Asset::Template->newByUrl($param[1]||"default_account_macro")->process(\%var);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,45 +61,6 @@ sub www_auth {
|
||||||
return WebGUI::Operation::Shared::userStyle($authMethod->$methodCall);
|
return WebGUI::Operation::Shared::userStyle($authMethod->$methodCall);
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
sub www_createAccount {
|
|
||||||
return www_auth("createAccount");
|
|
||||||
}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
sub www_deactivateAccount {
|
|
||||||
return www_auth("deactivateAccount");
|
|
||||||
}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
sub www_displayAccount {
|
|
||||||
return www_auth("displayAccount");
|
|
||||||
}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
sub www_displayLogin {
|
|
||||||
return www_auth("displayLogin");
|
|
||||||
}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
sub www_init {
|
|
||||||
return www_auth("init");
|
|
||||||
}
|
|
||||||
|
|
||||||
#Deprecated. Kept for backwards compatibility. Use op=auth&method=login
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
sub www_login {
|
|
||||||
return www_auth("login");
|
|
||||||
}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
sub www_logout {
|
|
||||||
return www_auth("logout");
|
|
||||||
}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
sub www_recoverPassword {
|
|
||||||
return www_auth("recoverPassword");
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ our @EXPORT = qw(&menuWrapper);
|
||||||
}
|
}
|
||||||
unless ($session{form}{op} eq "displayAccount"){
|
unless ($session{form}{op} eq "displayAccount"){
|
||||||
my %hash;
|
my %hash;
|
||||||
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=displayAccount').'">'.WebGUI::International::get(342).'</a>';
|
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=auth&method=init').'">'.WebGUI::International::get(342).'</a>';
|
||||||
push(@array,\%hash);
|
push(@array,\%hash);
|
||||||
}
|
}
|
||||||
unless ($session{form}{op} eq "editProfile"){
|
unless ($session{form}{op} eq "editProfile"){
|
||||||
|
|
@ -59,11 +59,11 @@ our @EXPORT = qw(&menuWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
my %logout;
|
my %logout;
|
||||||
$logout{'options.display'} = '<a href="'.WebGUI::URL::page('op=logout').'">'.WebGUI::International::get(64).'</a>';
|
$logout{'options.display'} = '<a href="'.WebGUI::URL::page('op=auth&method=logout').'">'.WebGUI::International::get(64).'</a>';
|
||||||
push(@array,\%logout);
|
push(@array,\%logout);
|
||||||
if ($session{setting}{selfDeactivation} && !WebGUI::Grouping::isInGroup(3)){
|
if ($session{setting}{selfDeactivation} && !WebGUI::Grouping::isInGroup(3)){
|
||||||
my %hash;
|
my %hash;
|
||||||
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=deactivateAccount').'">'.WebGUI::International::get(65).'</a>';
|
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=auth&method=deactivateAccount').'">'.WebGUI::International::get(65).'</a>';
|
||||||
push(@array,\%hash);
|
push(@array,\%hash);
|
||||||
}
|
}
|
||||||
return \@array;
|
return \@array;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue