diff --git a/files/sites-available/default b/files/sites-available/default index 33ce4b9..2c1b219 100644 --- a/files/sites-available/default +++ b/files/sites-available/default @@ -443,7 +443,7 @@ authorize { # Engineers → dynamic pool if (&control:Tmp-String-1 == "engineer") { update control { - Pool-Name := "engineers-%{sql:SELECT SUBSTRING_INDEX('%{User-Name}','@',-1)}" + Pool-Name := "engineers-%{sql:SELECT split_part('%{User-Name}', '@', 2)}" } } # If you are using /etc/smbpasswd, and are also doing mschap authentication, the un-comment this line, and configure the 'smbpasswd' module. @@ -650,7 +650,7 @@ accounting { ### rebuild Pool-Name update control { - Pool-Name := "engineers-%{sql:SELECT SUBSTRING_INDEX('%{User-Name}','@',-1)}" + Pool-Name := "engineers-%{sql:SELECT split_part('%{User-Name}', '@', 2)}" } ### apply only for engineers