summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/admin.pl30
-rwxr-xr-xbin/am.pl2
-rwxr-xr-xbin/hr.pl2
-rwxr-xr-xbin/login.pl2
4 files changed, 18 insertions, 18 deletions
diff --git a/bin/admin.pl b/bin/admin.pl
index 9642fc62..2c7c2da7 100755
--- a/bin/admin.pl
+++ b/bin/admin.pl
@@ -76,7 +76,7 @@ if ($form->{action}) {
} else {
# if there are no drivers bail out
- $form->error($locale->text('No Database Drivers available!')) unless (User->dbdrivers);
+ $form->error($locale->text('No Database Drivers available!')) unless (LedgerSMB::User->dbdrivers);
# create memberfile
if (! -f ${LedgerSMB::Sysconfig::memberfile}) {
@@ -89,7 +89,7 @@ password=
close FH;
}
- $root = new User "${LedgerSMB::Sysconfig::memberfile}", "root login";
+ $root = LedgerSMB::User->new("${LedgerSMB::Sysconfig::memberfile}", "root login");
unless($root && $root->{password}) {
&setup_initial_password();
@@ -277,7 +277,7 @@ sub list_users {
# type=submit $locale->text('Pg Database Administration')
# type=submit $locale->text('PgPP Database Administration')
- foreach $item (User->dbdrivers) {
+ foreach $item (LedgerSMB::User->dbdrivers) {
$dbdrivers .= qq|<button name="action" type="submit" class="submit" value="|.(lc $item).'_database_administration">'.$locale->text("$item Database Administration").qq|</button>|;
}
@@ -373,7 +373,7 @@ sub form_header {
if ($form->{login}) {
# get user
- $myconfig = new User "${LedgerSMB::Sysconfig::memberfile}", "$form->{login}";
+ $myconfig = LedgerSMB::User->new("${LedgerSMB::Sysconfig::memberfile}", "$form->{login}");
for (qw(company address signature)) { $myconfig->{$_} = $form->quote($myconfig->{$_}) }
for (qw(address signature)) { $myconfig->{$_} =~ s/\\n/\n/g }
@@ -394,7 +394,7 @@ sub form_header {
}
- %countrycodes = User->country_codes;
+ %countrycodes = LedgerSMB::User->country_codes;
$countrycodes = "";
foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} } keys %countrycodes) {
@@ -592,7 +592,7 @@ sub form_header {
</tr>|;
# list section for database drivers
- foreach $item (User->dbdrivers) {
+ foreach $item (LedgerSMB::User->dbdrivers) {
print qq|
<tr>
@@ -771,7 +771,7 @@ sub save {
# check for duplicates
if (!$form->{edit}) {
- $temp = new User "${LedgerSMB::Sysconfig::memberfile}", "$form->{login}";
+ $temp = LedgerSMB::User->new("${LedgerSMB::Sysconfig::memberfile}", "$form->{login}");
if ($temp->{login}) {
$form->error("$form->{login} ".$locale->text('is already a member!'));
@@ -796,7 +796,7 @@ sub save {
$form->{templates} = "${LedgerSMB::Sysconfig::templates}/$form->{templates}";
- $myconfig = new User "${LedgerSMB::Sysconfig::memberfile}", "$form->{login}";
+ $myconfig = LedgerSMB::User->new("${LedgerSMB::Sysconfig::memberfile}", "$form->{login}");
# redo acs variable and delete all the acs codes
@acs = split /;/, $form->{acs};
@@ -970,7 +970,7 @@ sub delete {
$myconfig{dbpasswd} = unpack 'u', $myconfig{dbpasswd};
for (keys %myconfig) { $form->{$_} = $myconfig{$_} }
- User->delete_login(\%$form);
+ LedgerSMB::User->delete_login(\%$form);
# delete config file for user
unlink "${LedgerSMB::Sysconfig::userspath}/$form->{login}.conf";
@@ -1049,7 +1049,7 @@ sub get_hash {
sub check_password {
- $root = new User "${LedgerSMB::Sysconfig::memberfile}", "root login";
+ $root = LedgerSMB::User->new("${LedgerSMB::Sysconfig::memberfile}", "root login");
if ($root->{password}) {
@@ -1211,14 +1211,14 @@ sub continue {
sub dbupdate {
- User->dbupdate(\%$form);
+ LedgerSMB::User->dbupdate(\%$form);
$form->redirect($locale->text('Dataset updated!'));
}
sub create_dataset {
- @dbsources = sort User->dbsources(\%$form);
+ @dbsources = sort LedgerSMB::User->dbsources(\%$form);
opendir SQLDIR, "sql/." or $form->error($!);
@@ -1343,7 +1343,7 @@ sub dbcreate {
$form->isblank("db", $locale->text('Dataset missing!'));
- User->dbcreate(\%$form);
+ LedgerSMB::User->dbcreate(\%$form);
$form->{title} = "LedgerSMB ".$locale->text('Accounting')
." ".$locale->text('Database Administration')
@@ -1373,7 +1373,7 @@ sub dbcreate {
sub delete_dataset {
- if (@dbsources = User->dbsources_unused(\%$form, ${LedgerSMB::Sysconfig::memberfile})) {
+ if (@dbsources = LedgerSMB::User->dbsources_unused(\%$form, ${LedgerSMB::Sysconfig::memberfile})) {
foreach $item (sort @dbsources) {
$dbsources .= qq|<input name="db" class="radio" type="radio" value="$item" />&nbsp;$item |;
@@ -1435,7 +1435,7 @@ sub dbdelete {
$form->error($locale->text('No Dataset selected!'));
}
- User->dbdelete(\%$form);
+ LedgerSMB::User->dbdelete(\%$form);
$form->{title} = "LedgerSMB ".$locale->text('Accounting')
." ".$locale->text('Database Administration')
diff --git a/bin/am.pl b/bin/am.pl
index 68a2827c..9a908e28 100755
--- a/bin/am.pl
+++ b/bin/am.pl
@@ -2044,7 +2044,7 @@ sub config {
for (qw(name company address signature)) { $myconfig{$_} = $form->quote($myconfig{$_}) }
for (qw(address signature)) { $myconfig{$_} =~ s/\\n/\n/g }
- %countrycodes = User->country_codes;
+ %countrycodes = LedgerSMB::User->country_codes;
$countrycodes = '';
foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} } keys %countrycodes) {
diff --git a/bin/hr.pl b/bin/hr.pl
index c124f0a9..c8f53549 100755
--- a/bin/hr.pl
+++ b/bin/hr.pl
@@ -716,7 +716,7 @@ sub save_employee {
# if it is a login change memberfile and .conf
if ($form->{employeelogin}) {
- $user = new User ${LedgerSMB::Sysconfig::memberfile}, $form->{employeelogin};
+ $user = LedgerSMB::User->new(${LedgerSMB::Sysconfig::memberfile}, $form->{employeelogin});
for (qw(name email role)) { $user->{$_} = $form->{$_} }
diff --git a/bin/login.pl b/bin/login.pl
index 2ef1c8aa..9eb63200 100755
--- a/bin/login.pl
+++ b/bin/login.pl
@@ -263,7 +263,7 @@ sub login {
}
- $user = new User ${LedgerSMB::Sysconfig::memberfile}, $form->{login};
+ $user = LedgerSMB::User->new(${LedgerSMB::Sysconfig::memberfile}, $form->{login});
# if we get an error back, bale out
if (($errno = $user->login(\%$form, ${LedgerSMB::Sysconfig::userspath})) <= -1) {