28 |
28 |
29 username = username.lower(); |
29 username = username.lower(); |
30 |
30 |
31 unsigned dests = !destination ? 0 : destination.count(',') + 1; |
31 unsigned dests = !destination ? 0 : destination.count(',') + 1; |
32 |
32 |
33 if(!userdir) |
|
34 userdir = username; |
|
35 if(newpass1 != newpass2) |
33 if(newpass1 != newpass2) |
36 error("The passwords you entered do not match"); |
34 error("The passwords you entered do not match"); |
37 else { |
35 else { |
38 server_call call("adduser2", dests + 5); |
36 server_call call("adduser3", dests + 6); |
39 call.operand(0, vdomain); |
37 call.operand(0, vdomain); |
40 call.operand(1, username); |
38 call.operand(1, username); |
41 call.operand(2, password); |
39 call.operand(2, password); |
42 call.operand(3, newpass1); |
40 call.operand(3, newpass1); |
43 call.operand(4, userdir); |
41 call.operand(4, userdir); |
|
42 call.operand(5, "yes"); |
44 |
43 |
45 unsigned i = 0; |
44 unsigned i = 0; |
46 for(mystring_iter iter(destination, ','); i < dests && iter; ++iter, ++i) |
45 for(mystring_iter iter(destination, ','); i < dests && iter; ++iter, ++i) |
47 call.operand(i+5, *iter); |
46 call.operand(i+6, *iter); |
48 |
47 |
49 response resp = call.call(); |
48 response resp = call.call(); |
50 if(!resp) |
49 if(!resp) |
51 error(resp.msg); |
50 error(resp.msg); |
52 else |
51 else |