Petrucci schrieb:
> Hi,
> push (@Params, {
> Frontend => 'User',
> Name => 'User',
> Multiple => 0,
> Size => 0,
> Data => {
> %UserList,
> },
>
> and in sub Run():
>
> my $User = $Param{UserList};
>
>
> but it fails, cause $User is empty, why?:
Because you said, that the selectbox has the name "User" and not
"UserList". You said it with "Name => 'User'"
BTW: You should not use the Variable in the SQL statement. Use the Bind
mechanism instead as this will improve security (any special characters
are quoted automatically).
Instead of
$Self->{DBObject}->Prepare(
SQL => " ... UserLogin = $User"
);
do this:
$Self->{DBObject}->Prepare(
SQL => " ... UserLogin = ?",
Bind => [ \$User ],
);
Cheers,
Renée
--
Perl-Magazin: http://perl-magazin.de
Perl-Nachrichten: http://perl-nachrichten.de
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/