On Wed, 2006-04-12 at 16:24 +0200, Johannes Berg wrote:
On Wed, 2006-04-12 at 17:17 +0300, Timo Sirainen wrote:
Username formatting before it's looked up from databases. You can use
the standard variables here, eg. %Lu would lowercase the username or
%n would drop away the domain if it was given. This translation is
done after auth_username_translation changes.
#auth_username_format =
Wouldn't it be better to do it the other way around, and have it default to auth_username_format = %u@%n or something? OTOH, that need special handling of a trailing @ character (if %n is empty) or a new %X variable that is "@%n" or ""...
I think I'm doing it the way you want, but you just misunderstood the explanation. %u means username with domain, %n means the username without domain and %d is only the domain. I updated the comment to contain one more example:
Username formatting before it's looked up from databases. You can use
the standard variables here, eg. %Lu would lowercase the username, %n would
drop away the domain if it was given, or "%n-AT-%d" would change the '@' into
"-AT-". This translation is done after auth_username_translation changes.
#auth_username_format =
The default could be set as %u in there, but I didn't add it because then it would uselessly do a bit more work. The empty default just means that it doesn't do any changes.