[horde] Custom SQL queries

Mark Richardson mark at wire-solutions.nl
Tue Jul 17 06:08:49 UTC 2007



  Hi, 

  I noticed that when using  custom sql queries for authentication etc the \L & \P "special tokens" only get replaced for the auth query, why are these not available for the list users query for instance ? 

  I was looking for a way to limit the list of users available to an user to share his/her only to the users within the same domain using this query: 

  SELECT users.username FROM users JOIN shadow ON users.username::text = shadow.username::text WHERE ( users.username LIKE ('%' || (select split_part( \L, '@', 2)) || '%') AND users.active = true); 

  The \L is in the query literally when it is executed on the postgres server, the info on the page does not specify that it will only work on the auth query, and if I did not want to use the macro I could choose not to use it in my query ..  

  Is this a bug, a feature, or should I do this another way ? 

  Thanks, 

  Mark 


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


More information about the horde mailing list