The question is: By the way, what is the encryption method for yii2's built-in authentication password? Can it be modified?
The problem is as follows:
By the way, what is the encryption method for the yii2 built-in verification password? Can it be modified?
Reply content:
The problem is as follows:
By the way, what is the encryption method for the yii2 built-in verification password? Can it be modified?
... Thatlogin
Not herecommon\model\User.php
AndYii::$app->user
Inuser
Neithercommon\model\User.php
,yii\web\User
, Thenlogin
This is what we found;
public function login(IdentityInterface $identity, $duration = 0) { if ($this->beforeLogin($identity, false, $duration)) { $this->switchIdentity($identity, $duration); $id = $identity->getId(); $ip = Yii::$app->getRequest()->getUserIP(); if ($this->enableSession) { $log = "User '$id' logged in from $ip with duration $duration."; } else { $log = "User '$id' logged in from $ip. Session not enabled."; } Yii::info($log, __METHOD__); $this->afterLogin($identity, false, $duration); } return !$this->getIsGuest(); }