Revision
244
Author
misc
Date
2011-01-07 02:39:35 +0100 (Fri, 07 Jan 2011)

Log Message

fix string substitution, this emptied the searchfilter, leading to a catdap error page

Modified Paths

Modified: identity/CatDap/trunk/lib/CatDap/Controller/user.pm
===================================================================
--- identity/CatDap/trunk/lib/CatDap/Controller/user.pm	2011-01-07 00:59:10 UTC (rev 243)
+++ identity/CatDap/trunk/lib/CatDap/Controller/user.pm	2011-01-07 01:39:35 UTC (rev 244)
@@ -241,8 +241,7 @@
     $attr = $c->req->param('attribute');
     $value = $c->req->param('value');
     $user = $c->user->username;
-    $userfilter = $c->user->store->user_filter;
-    $userfilter = s/%s/$c->user->username/g;
+    $userfilter = sprintf($c->user->store->user_filter ,$c->user->username);
     $c->log->debug("Searching for user $user with $userfilter");
     $mesg = $c->model('User')->search($userfilter);
     $entry = $mesg->entry;