Revision 469 (by ahitrov, 2014/12/24 13:57:26) |
Moving Contenido to Apache 2
|
<%args>
$login => undef
</%args>
<%init>
unless ($user->check_group(1))
{
$m->clear_buffer;
$m->abort(403);
}
my $luser;
if ($login)
{
$luser = $keeper->get_user_by_login($login);
my %sections = ();
foreach my $name (keys %ARGS)
{
if ($name =~ /^section_(\d+)$/)
{
$sections{$1} = 1;
}
}
my @sections_in_order = ();
push (@sections_in_order, keys(%sections));
# ������ ���� ����� - ��� ����� ����� ������ ����� ���� �� �����������...
$luser->{groups} = [@sections_in_order];
$luser->store();
$r->header_out("Location", "users.html?login=$login");
$r->status(302);
$r->send_http_header();
$m->abort();
}
</%init>