Skip to content

Initial install of Yii Advanced - Username doesn't exist #35

@nathan005

Description

@nathan005

After initial install of the Yii Advanced template (what I'm currently testing)
Your user table replaces the default Yii table.
In this process it renames username to name

this will throw errors in frontend and backend when logging in.
as username is called
ex: backend/views/main.php - line 67
Yii::$app->user->identity->username

and activeRecord - in /common/models/User.php
$this->_user = User::findByUsername($this->username);

These can all be replaced, but not sure why we need to rename username to name

I can update the references by pointing them to name instead of username, but seems like extra work


FYI - I get that it is by design that you are trying to override the Identity class.
However it doesn't seem to happen completely

In my fresh install sjaakp\pluto\models\User did not replace the Identity class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions