Answer the question
In order to leave comments, you need to log in
Yii\web\User how does access token work?
I updated in the User accessToken table. Now the password is always wrong when logging in. Can anyone explain how it works? And can it be changed from time to time?
my secret code
public function actionLogin()
{
$this->layout = '@app/views/layouts/auth';
if (!Yii::$app->user->isGuest) {
return $this->goHome();
}
$model = new User();
if ($model->load(Yii::$app->request->post()) && $model->login()) {
return $this->goBack(Yii::$app->request->get('back'));
}
$model->password = '';
return $this->render('login', [
'model' => $model,
]);
}
public function login()
{
if ($this->validate()) {
return Yii::$app->user->login(self::findByUser($this->username));
}
return false;
}
Answer the question
In order to leave comments, you need to log in
But just on the output on the site it is impossible to show articles whose posting time is less than the present time?
You can write a script that takes articles from the database and posts them to the site.
And run it through Cron...
For example, here:
https://cron-job.org/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question