Replace some usages of getModel(), getController(), etc. in the Rhymix Framework

This commit is contained in:
Kijin Sung 2020-05-18 21:51:36 +09:00
parent 052930a6d4
commit 786c9c9b8c
5 changed files with 11 additions and 11 deletions

View file

@ -112,9 +112,9 @@ class Password
*/
public static function getDefaultAlgorithm()
{
if (function_exists('getModel'))
if (class_exists('\MemberModel'))
{
$config = getModel('member')->getMemberConfig();
$config = \MemberModel::getInstance()->getMemberConfig();
$algorithm = $config->password_hashing_algorithm;
if (strval($algorithm) === '')
{
@ -135,9 +135,9 @@ class Password
*/
public static function getWorkFactor()
{
if (function_exists('getModel'))
if (class_exists('\MemberModel'))
{
$config = getModel('member')->getMemberConfig();
$config = \MemberModel::getInstance()->getMemberConfig();
$work_factor = $config->password_hashing_work_factor;
if (!$work_factor || $work_factor < 4 || $work_factor > 31)
{