<?= getMenu(); ?>
<?= getMenu(index); ?>
или так
<?php echo getMenu(); ?>
<?php echo getMenu(index); ?>
public function login()
{
if (!$this->validate()) {
return false;
}
$attributes = [
'email' => $this->username,
'active' => true
];
/* @var User $user */
if (($user = User::findOne($attributes)) && User::validatePassword($user, $this->password)) {
return \Yii::$app->user->login($user, $this->rememberMe ? self::$timeout : 0);
}
$this->addError('username', \Yii::t('models/LoginForm', 'Wrong E-Mail or password'));
return false;
}