User Tools

Site Tools


reference:user_manager_script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
reference:user_manager_script [2024/04/22 09:36] – created paulreference:user_manager_script [2024/04/22 09:37] (current) paul
Line 23: Line 23:
 <code> <code>
 function TranslateUsername(Protocol, Username) function TranslateUsername(Protocol, Username)
 +--look up username in a mapping table
     users = {     users = {
                 ["joe@company.co.uk"] = "joe",                 ["joe@company.co.uk"] = "joe",
Line 28: Line 29:
                 }                 }
  
-    if (users[username]) then +    if (users[Username]) then 
-        return users[username]+        return users[Username]
     end     end
          
-    return username;+    return Username;
 end end
 </code> </code>
Line 43: Line 44:
     Username = string.gsub(Username, "@company%.com$", "");     Username = string.gsub(Username, "@company%.com$", "");
          
-    return username;+    return Username;
 end end
 </code> </code>
reference/user_manager_script.1713775011.txt.gz · Last modified: 2024/04/22 09:36 by paul