aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CatDap/Controller
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-01-07 01:39:35 +0000
committerMichael Scherer <misc@mageia.org>2011-01-07 01:39:35 +0000
commit27c80f9ee652b3c086ee876e72ea9bd8ff7c7edc (patch)
tree6c15c9787595f473a757f18ff6324b5f757559ac /lib/CatDap/Controller
parenta08fe5b6bdbdd5be743476b3fe5dfb661c92bff3 (diff)
downloadidentity-27c80f9ee652b3c086ee876e72ea9bd8ff7c7edc.tar
identity-27c80f9ee652b3c086ee876e72ea9bd8ff7c7edc.tar.gz
identity-27c80f9ee652b3c086ee876e72ea9bd8ff7c7edc.tar.bz2
identity-27c80f9ee652b3c086ee876e72ea9bd8ff7c7edc.tar.xz
identity-27c80f9ee652b3c086ee876e72ea9bd8ff7c7edc.zip
fix string substitution, this emptied the searchfilter, leading to a catdap error page
Diffstat (limited to 'lib/CatDap/Controller')
-rw-r--r--lib/CatDap/Controller/user.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CatDap/Controller/user.pm b/lib/CatDap/Controller/user.pm
index 5c58d48..0322b87 100644
--- a/lib/CatDap/Controller/user.pm
+++ b/lib/CatDap/Controller/user.pm
@@ -241,8 +241,7 @@ sub add : Local {
$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;