Revision 0e65146d
Von Moritz Bunkus vor fast 17 Jahren hinzugefügt
scripts/dbupgrade2_tool.pl | ||
---|---|---|
20 | 20 |
|
21 | 21 |
$lxdebug = LXDebug->new(); |
22 | 22 |
|
23 |
use SL::Auth; |
|
23 | 24 |
use SL::Form; |
24 | 25 |
use SL::User; |
25 | 26 |
use SL::Locale; |
... | ... | |
33 | 34 |
my ($opt_list, $opt_tree, $opt_rtree, $opt_nodeps, $opt_graphviz, $opt_help); |
34 | 35 |
my ($opt_user, $opt_apply); |
35 | 36 |
|
36 |
our (%myconfig, $form, $user); |
|
37 |
our (%myconfig, $form, $user, $auth);
|
|
37 | 38 |
|
38 | 39 |
sub show_help { |
39 | 40 |
my $help_text = <<'END_HELP' |
... | ... | |
308 | 309 |
dump_nodeps() if ($opt_nodeps); |
309 | 310 |
|
310 | 311 |
if ($opt_user) { |
311 |
my $file_name = "users/${opt_user}.conf"; |
|
312 |
$auth = SL::Auth->new(); |
|
313 |
if (!$auth->session_tables_present()) { |
|
314 |
$form->error("The session and user management tables are not present in the " . |
|
315 |
"authentication database. Please use the administration web interface " . |
|
316 |
"and to create them."); |
|
317 |
} |
|
318 |
|
|
319 |
%myconfig = $auth->read_user($opt_user); |
|
320 |
|
|
321 |
if (!$myconfig{login}) { |
|
322 |
$form->error($form->format_string("The user '#1' does not exist.", $opt_user)); |
|
323 |
} |
|
312 | 324 |
|
313 |
eval { require($file_name); }; |
|
314 |
$form->error("File '$file_name' was not found") if $@; |
|
315 | 325 |
$locale = new Locale($myconfig{countrycode}, "all"); |
316 |
$user = new User("users/members", $opt_user); |
|
326 |
$user = new User($opt_user); |
|
327 |
|
|
317 | 328 |
map { $form->{$_} = $myconfig{$_} } keys %myconfig; |
318 | 329 |
} |
319 | 330 |
|
Auch abrufbar als: Unified diff
Anpassung an die neue Art der Benutzerdatenspeicherung.