I need to change my users access to creating directory and try doing it by adding the directory again without success. I get another line in the interface.
How to do ?
Need a c_ModifyUserDirectory
-
- Site Admin
- Posts: 2107
- Joined: Tue Sep 29, 2009 6:09 am
Re: Need a c_ModifyUserDirectory
What do you mean? Just change the existing home folder to a new folder path, and keep the same folder permissions? If so, you can take the following script:
Code: Select all
local domain = "YourDomainName"
local username = "YourUserName"
local newFolder = "d:/testfolder/"
local user = c_GetUser(domain, username)
for k,v in pairs(user) do
if type(v) == "boolean" then
if v == true then
user[k] = 1
else
user[k] = 0
end
end
end
if type(user.directories) == "table" then
user.directories[1].dir = newFolder
end
user.oldpassword = user.password
AddUser(domain, user)