mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Implements language selection
This commit is contained in:
parent
4d69182c89
commit
7ed1e49888
13 changed files with 201 additions and 17 deletions
|
|
@ -12,6 +12,7 @@ local username = _POST["username"]
|
|||
local host_role = _POST["user_role"]
|
||||
local networks = _POST["allowed_networks"]
|
||||
local allowed_interface = _POST["allowed_interface"]
|
||||
local language = _POST["user_language"]
|
||||
|
||||
-- for captive portal users
|
||||
local old_host_pool_id = _POST["old_host_pool_id"]
|
||||
|
|
@ -56,6 +57,13 @@ if(allowed_interface ~= nil) then
|
|||
end
|
||||
end
|
||||
|
||||
if(language ~= nil) then
|
||||
if(not ntop.changeUserLanguage(username, language)) then
|
||||
print ("{ \"result\" : -1, \"message\" : \"Error in changing the user language\" }")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if(limited_lifetime ~= nil) then
|
||||
if not ntop.addUserLifetime(username, lifetime_secs) then
|
||||
print ("{ \"result\" : -1, \"message\" : \"Error in changing the host lifetime\" }")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue