diff --git a/codepot/src/codepot/models/loginmodel.php b/codepot/src/codepot/models/loginmodel.php index 1ceab7e7..669f70ef 100644 --- a/codepot/src/codepot/models/loginmodel.php +++ b/codepot/src/codepot/models/loginmodel.php @@ -125,8 +125,8 @@ class LoginModel extends CI_Model function formatString ($fmt, $userid, $password) { - $fmt = preg_replace(sprintf('/\$\{?%s\}?/', 'userid'), $userid, $fmt); - $fmt = preg_replace(sprintf('/\$\{?%s\}?/', 'password'), $password, $fmt); - return $fmt; + $regexs = array('${userid}', '${password}'); + $repl = array($userid, $password); + return str_replace($regexs, $repl, $fmt); } }