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

@ -11,6 +11,7 @@
namespace Da\User\Helper;
use yii\base\Exception;
use yii\base\Security;
class SecurityHelper
@ -32,12 +33,23 @@ class SecurityHelper
* @param null|int $cost
*
* @return string
*
* @throws Exception
*/
public function generatePasswordHash($password, $cost = null)
{
return $this->security->generatePasswordHash($password, $cost);
}
/**
* Generates a random string
*
* @param int $length
*
* @return string
*
* @throws Exception
*/
public function generateRandomString($length = 32)
{
return $this->security->generateRandomString($length);