一、对密码进行加密和验证客户端传输的密码是否正确1、对密码进行加密$hash = Yii::$app->getSecurity()->generatePasswordHash($password);2、对客户端传递的密码进行验证