mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Fix to use ACL modify_user to change theme
https://github.com/webmin/webmin/pull/2013#discussion_r1342020745
This commit is contained in:
@@ -37,11 +37,10 @@ my $themes = {
|
||||
'3' => '' };
|
||||
my $theme = $themes->{$in{'theme'}};
|
||||
# Change the theme
|
||||
$gconfig{"theme_$remote_user"} = $theme;
|
||||
&write_file("$config_directory/config", \%gconfig);
|
||||
my %miniserv;
|
||||
&get_miniserv_config(\%miniserv);
|
||||
$miniserv{"preroot_$remote_user"} = $theme;
|
||||
&put_miniserv_config(\%miniserv);
|
||||
&foreign_require('acl');
|
||||
my @users = &acl::list_users();
|
||||
my ($user) = grep { $_->{'name'} eq $remote_user } @users;
|
||||
$user->{'theme'} = $theme;
|
||||
&acl::modify_user($user->{'name'}, $user);
|
||||
&restart_miniserv();
|
||||
&redirect(&get_webprefix() . "/");
|
||||
|
||||
Reference in New Issue
Block a user