mirror of
https://github.com/CyanoFresh/SmartHomePHP.git
synced 2026-03-03 08:34:02 +01:00
20 lines
346 B
PHP
20 lines
346 B
PHP
<?php
|
|
|
|
namespace app\controllers;
|
|
|
|
use app\models\User;
|
|
use Yii;
|
|
use yii\web\Controller;
|
|
|
|
class ProfileController extends Controller
|
|
{
|
|
public function actionIndex($id = false)
|
|
{
|
|
$user = $id ? User::findOne($id) : Yii::$app->user->identity;
|
|
|
|
return $this->render('index', [
|
|
'user' => $user,
|
|
]);
|
|
}
|
|
}
|