Код: Выделить всё
'url' => ['/user/profile', 'id' => Yii::$app->user->identity->id],
Код: Выделить всё
'url' => ['/user/profile', 'id' => Yii::$app->user->identity->id],
Из сессии.Yii::$app->user->identity->id в RBAC достается из базы или из сессии?
Код: Выделить всё
// Профиль
public function actionProfile($id)
{
$title = 'Профиль';
$keywords = 'Профиль заявку...ключевики';
$description = 'Профиль заявку...описание';
// Верификация
$user_real = User::user_real();
return $this->render('profile', [
'userDate' => $this->findData($id),
'title' => $title,
'keywords' => $keywords,
'description' => $description,
'user_real' => $user_real,
]);
}
public function findData($id)
{
if ( ($model = User::findOne($id) ) !== null) {
$user = User::find()->where(['id' => $id])->one();
return $user;
} else
{
throw new NotFoundHttpException('The requested page does not st.');
}
}