more session related bug fixes
This commit is contained in:
parent
f2cccdff9f
commit
b0ffb721b6
44 changed files with 143 additions and 143 deletions
|
|
@ -27,7 +27,7 @@ Macro for displaying the current User's username.
|
|||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my $session = shift;
|
||||
return $session->user->profileField("username");
|
||||
return $session->user->username;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ sub process {
|
|||
my $templateId = $param[2] || "PBtmpl0000000000000044";
|
||||
my %var;
|
||||
my $i18n = WebGUI::International->new($session,'Macro_L_loginBox');
|
||||
$var{'user.isVisitor'} = ($session->user->profileField("userId") eq "1");
|
||||
$var{'user.isVisitor'} = ($session->user->userId eq "1");
|
||||
$var{'customText'} = $param[1];
|
||||
$var{'customText'} =~ s/%(.*?)%/_createURL($session,$1)/ge;
|
||||
$var{'hello.label'} = $i18n->get(48);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ sub process {
|
|||
my $login = $param[0] || $i18n->get(716);
|
||||
my $logout = $param[1] || $i18n->get(717);
|
||||
my %var;
|
||||
if ($session->user->profileField("userId") eq '1') {
|
||||
if ($session->user->userId eq '1') {
|
||||
return $session->url->page("op=auth;method=init") if ($param[0] eq "linkonly");
|
||||
$var{'toggle.url'} = $session->url->page('op=auth;method=init');
|
||||
$var{'toggle.text'} = $login;
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ sub process {
|
|||
}
|
||||
}
|
||||
# If we reach this point, we had no success in finding an asset the user can view:
|
||||
$session->errorHandler->warn("Could not find a random thread that was viewable by the user ".$session->user->profileField("username")." after $numberOfTries tries. Check parameters of macro on page ".$session->asset->get('url'));
|
||||
$session->errorHandler->warn("Could not find a random thread that was viewable by the user ".$session->user->username." after $numberOfTries tries. Check parameters of macro on page ".$session->asset->get('url'));
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue