re #108 use app main logger + multiple fixes
This commit is contained in:
@ -26,7 +26,7 @@ class RbacItemsValidator extends Validator
|
||||
}
|
||||
|
||||
foreach ($value as $item) {
|
||||
if ($this->getAuthManager()->getItem($item) == null) {
|
||||
if ($this->getAuthManager()->getItem($item) === null) {
|
||||
return [Yii::t('usuario', 'There is neither role nor permission with name "{0}"', [$item]), []];
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ class RbacRuleNameValidator extends Validator
|
||||
*/
|
||||
protected function validateValue($value)
|
||||
{
|
||||
if ($this->previousName != $value) {
|
||||
if ($this->previousName !== $value) {
|
||||
$rule = $this->getAuthManager()->getRule($value);
|
||||
|
||||
if ($rule instanceof Rule) {
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Da\User\Validator;
|
||||
|
||||
use Da\TwoFA\Exception\InvalidSecretKeyException;
|
||||
use Da\TwoFA\Manager;
|
||||
use Da\User\Contracts\ValidatorInterface;
|
||||
use Da\User\Model\User;
|
||||
@ -37,6 +38,8 @@ class TwoFactorCodeValidator implements ValidatorInterface
|
||||
|
||||
/**
|
||||
* @return bool|int
|
||||
*
|
||||
* @throws InvalidSecretKeyException
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user