Correctly remove parameters array in role files (so we can add/remove email and display name)

tags/0.1.9
Daniel Berteaud 11 years ago
parent 3c7856c549
commit 3d85c4fa95
  1. 8
      root/etc/e-smith/events/actions/ajaxplorer-user-rights

@ -89,11 +89,9 @@ foreach my $user (($a->users),$a->get('admin')){
} }
} }
# As we're here, lets update the email address and the display name # As we're here, lets update the email address and the display name
# First, delete parameter if it's an array (meaning it's empty # First, delete parameter if it's an array (meaning it's empty)
delete $data->{"\0*\0parameters"} unless( delete $data->{"\0*\0parameters"} if (ref ($data->{"\0*\0parameters"})=~ m/ARRAY/i);
defined $data->{"\0*\0parameters"}->{'AJXP_REPO_SCOPE_ALL'}->{'core.conf'}->{'email'} ||
defined $data->{"\0*\0parameters"}->{'AJXP_REPO_SCOPE_ALL'}->{'core.conf'}->{'USER_DISPLAY_NAME'}
);
$data->{"\0*\0parameters"}->{'AJXP_REPO_SCOPE_ALL'}->{'core.conf'}->{'email'} = "$name\@$domain"; $data->{"\0*\0parameters"}->{'AJXP_REPO_SCOPE_ALL'}->{'core.conf'}->{'email'} = "$name\@$domain";
$data->{"\0*\0parameters"}->{'AJXP_REPO_SCOPE_ALL'}->{'core.conf'}->{'USER_DISPLAY_NAME'} = "$first $last"; $data->{"\0*\0parameters"}->{'AJXP_REPO_SCOPE_ALL'}->{'core.conf'}->{'USER_DISPLAY_NAME'} = "$first $last";

Loading…
Cancel
Save