84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
现在的问题是这样的:
顺便问一下,yii2自带的验证密码的,加密方式是什么?可以做修改吗?
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
...那个login本来就不在common\model\User.php里,另外Yii::$app->user里的这个user也不是common\model\User.php,而是yii\web\User,那么login也就找到了;
login
common\model\User.php
Yii::$app->user
user
yii\web\User
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(); }
...那个
login
本来就不在common\model\User.php
里,另外Yii::$app->user
里的这个user
也不是common\model\User.php
,而是yii\web\User
,那么login
也就找到了;