summaryrefslogtreecommitdiffstats
path: root/Dozentenmodulserver/src/sql
diff options
context:
space:
mode:
Diffstat (limited to 'Dozentenmodulserver/src/sql')
-rw-r--r--Dozentenmodulserver/src/sql/SQL.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/Dozentenmodulserver/src/sql/SQL.java b/Dozentenmodulserver/src/sql/SQL.java
index c3582527..84e8cd11 100644
--- a/Dozentenmodulserver/src/sql/SQL.java
+++ b/Dozentenmodulserver/src/sql/SQL.java
@@ -34,7 +34,7 @@ public class SQL {
try {
stm=con.createStatement();
- int ret=stm.executeUpdate("INSERT INTO `bwLehrpool`.`FtpUsers`(`User`,`Password`,`Dir`)VALUES('"+user+"','"+pass+"','/');");
+ int ret=stm.executeUpdate("INSERT INTO `bwLehrpool`.`FtpUsers`(`User`,`Password`,`Uid`,`Gid`,`Dir`)VALUES('"+user+"','"+pass+"','10001','12345','/srv/openslx/nfs/temp');");
con.commit();
return ret;
} catch (SQLException e) {
@@ -44,6 +44,21 @@ public class SQL {
return -1;
}
+ public int DeleteUser(Connection con, String user)
+ {
+ Statement stm;
+ try {
+ stm=con.createStatement();
+
+ int ret=stm.executeUpdate("DELETE FROM `bwLehrpool`.`FtpUsers` where User like '"+user+"';");
+ con.commit();
+ return ret;
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return -1;
+ }
}