re #108 use app main logger + multiple fixes

This commit is contained in:
Antonio Ramirez
2017-11-12 21:58:48 +01:00
parent 77430fbb74
commit 190fafa5f1
30 changed files with 100 additions and 63 deletions

View File

@ -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]), []];
}
}

View File

@ -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) {

View File

@ -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()
{