fixed a bug in LoginModel::formatString()
This commit is contained in:
parent
25091294cc
commit
833ced68eb
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user