fixed a bug in LoginModel::formatString()

This commit is contained in:
hyung-hwan 2021-10-19 04:06:31 +00:00
parent 25091294cc
commit 833ced68eb

View File

@ -125,8 +125,8 @@ class LoginModel extends CI_Model
function formatString ($fmt, $userid, $password) function formatString ($fmt, $userid, $password)
{ {
$fmt = preg_replace(sprintf('/\$\{?%s\}?/', 'userid'), $userid, $fmt); $regexs = array('${userid}', '${password}');
$fmt = preg_replace(sprintf('/\$\{?%s\}?/', 'password'), $password, $fmt); $repl = array($userid, $password);
return $fmt; return str_replace($regexs, $repl, $fmt);
} }
} }