summaryrefslogtreecommitdiff
path: root/bin/admin.pl
diff options
context:
space:
mode:
Diffstat (limited to 'bin/admin.pl')
-rwxr-xr-xbin/admin.pl20
1 files changed, 12 insertions, 8 deletions
diff --git a/bin/admin.pl b/bin/admin.pl
index 42022d36..1019b204 100755
--- a/bin/admin.pl
+++ b/bin/admin.pl
@@ -938,16 +938,20 @@ sub delete {
}
#users_conf
- my $deleteUser =
- $dbh->prepare(
-"DELETE FROM users_conf USING users WHERE users.username = ? and users.id = users_conf.id;"
- );
- $deleteUser->execute( $form->{login} );
+
+ my $deleteUser = $dbh->prepare("select id FROM users WHERE username = ?;");
- #and now users
- $deleteUser = $dbh->prepare("DELETE FROM users WHERE username = ?;");
$deleteUser->execute( $form->{login} );
+ my $id1=$deleteUser->fetchrow();
+
+ $dbh->do("DELETE FROM users_conf WHERE id=$id1;") or print "error";
+ $dbh->do("DELETE FROM users WHERE id=$id1;") or print "Error";
+
+ $form->{login}="admin";
+
+
+
$form->redirect( $locale->text('User deleted!') );
}
@@ -971,7 +975,7 @@ sub change_admin_password {
print qq|
<body class="admin">
- <form method="post" action="$form->{script}">
+ <form method="get" action="$form->{script}">
<table>
<tr class="listheading">
<th>| . $locale->text('Change Password') . qq|</th>