- strNoteAddress,
strNoteZip,
strNotePhone,
strNoteFax,
strNoteEmail,
strNoteMemo
How to change user data via Lua?
-
- Posts: 8
- Joined: Wed Feb 22, 2012 6:04 am
How to change user data via Lua?
I want to change the settings programmatically:
-
- Site Admin
- Posts: 2080
- Joined: Tue Sep 29, 2009 6:09 am
Re: How to change user data via Lua?
Code: Select all
local strDomain = "mydomain"
local strUsername = "myuser"
local tableUser = c_GetUser(strDomain,strUsername)
--change all the boolean values into integer values
for k,v in pairs(tableUser) do
if type(v) == "boolean" then
if v == true then
tableUser[k] = 1
else
tableUser[k] = 0
end
end
end
tableUser.note_address = ""
tableUser.note_zip = ""
tableUser.note_phone = ""
tableUser.note_fax = ""
tableUser.note_email = ""
tableUser.note_memo = ""
tableUser.oldpassword = tableUser.password
AddUser(strDomain,tableUser)
-
- Posts: 8
- Joined: Wed Feb 22, 2012 6:04 am
Re: How to change user data via Lua?
Thank you.
To run this code I need to change the script: c:\Program Files\Wing FTP Server\webclient\changepass.html
Why then he did not call the function c_GetUser???
What to do?
To run this code I need to change the script: c:\Program Files\Wing FTP Server\webclient\changepass.html
Why then he did not call the function c_GetUser???
What to do?
-
- Site Admin
- Posts: 2080
- Joined: Tue Sep 29, 2009 6:09 am
Re: How to change user data via Lua?
The previous script has been modified, please check it again.
-
- Posts: 8
- Joined: Wed Feb 22, 2012 6:04 am
Re: How to change user data via Lua?
![Image](http://s018.radikal.ru/i514/1202/79/066d8ff93f57.png)
![Image](http://s017.radikal.ru/i435/1202/ac/9327e3741ec5.png)
What to do?
-
- Posts: 8
- Joined: Wed Feb 22, 2012 6:04 am
Re: How to change user data via Lua?
Any ideas how to remove this error?
-
- Site Admin
- Posts: 2080
- Joined: Tue Sep 29, 2009 6:09 am
Re: How to change user data via Lua?
It means you can't get that user.