title: Yii2 can't save user data from the form
body: <p>I'm trying to implement user profiles in Yii2 (advanced template). I've used Gii CRUD generator for the User model and renamed everywhere "view" to "profile" (in controller, views etc.). But when I try to save updated data, it is not saved in database while <code>$model-&gt;save()</code> is returning <code>true</code>.</p>
  
  <p><strong>Model:</strong></p>
  
  <p>
  
  <pre><code>public static function tableName()
  {
      return '{{%user}}';
  }
  
  
  public function behaviors()
  {
      return [
          TimestampBehavior::className(),
      ];
  }
  
  
  public function rules()
  {
      return [
          ['status', 'default', 'value' =&gt; self::STATUS_ACTIVE],
          ['status', 'in', 'range' =&gt; [self::STATUS_ACTIVE, self::STATUS_DELETED]],
          [['image'], 'file'],
      ];
  }
  
  public function attributeLabels()
  {
      return [
          'username' =&gt; 'Логин',
          'email' =&gt; 'Email',
          'image' =&gt; 'Изображение',
          'status' =&gt; 'Статус',
          'info' =&gt; 'Информация о себе'
      ];
  }
  
  public static function findIdentity($id)
  {
      return static::findOne(['id' =&gt; $id, 'status' =&gt; self::STATUS_ACTIVE]);
  }
  
  
  public static function findIdentityByAccessToken($token, $type = null)
  {
      throw new NotSupportedException('"findIdentityByAccessToken" is not implemented.');
  }
  
  public static function findByUsername($username)
  {
      return static::findOne(['username' =&gt; $username, 'status' =&gt; self::STATUS_ACTIVE]);
  }
  
  public static function findByPasswordResetToken($token)
  {
      if (!static::isPasswordResetTokenValid($token)) {
          return null;
      }
  
      return static::findOne([
          'password_reset_token' =&gt; $token,
          'status' =&gt; self::STATUS_ACTIVE,
      ]);
  }
  
  public static function isPasswordResetTokenValid($token)
  {
      if (empty($token)) {
          return false;
      }
      $expire = Yii::$app-&gt;params['user.passwordResetTokenExpire'];
      $parts = explode('_', $token);
      $timestamp = (int) end($parts);
      return $timestamp + $expire &gt;= time();
  }
  
  public function getId()
  {
      return $this-&gt;getPrimaryKey();
  }
  
  public function getAuthKey()
  {
      return $this-&gt;auth_key;
  }
  
  public function validateAuthKey($authKey)
  {
      return $this-&gt;getAuthKey() === $authKey;
  }
  
  public function validatePassword($password)
  {
      return Yii::$app-&gt;security-&gt;validatePassword($password, $this-&gt;password_hash);
  }
  
  public function setPassword($password)
  {
      $this-&gt;password_hash = Yii::$app-&gt;security-&gt;generatePasswordHash($password);
  }
  
  public function generateAuthKey()
  {
      $this-&gt;auth_key = Yii::$app-&gt;security-&gt;generateRandomString();
  }
  
  public function generatePasswordResetToken()
  {
      $this-&gt;password_reset_token = Yii::$app-&gt;security-&gt;generateRandomString() . '_' . time();
  }
  
  public function removePasswordResetToken()
  {
      $this-&gt;password_reset_token = null;
  }
  </code></pre>
  
  <p><strong>Controller action:</strong></p>
  
  <pre><code>public function actionUpdate($id)
  {
      $model = $this-&gt;findModel($id);
  
      if ($model-&gt;load(Yii::$app-&gt;request-&gt;post()) &amp;&amp; $model-&gt;save()) {
          return $this-&gt;redirect(['profile', 'id' =&gt; $model-&gt;id]);
      } else {
          return $this-&gt;render('update', [
              'model' =&gt; $model,
          ]);
      }
  }
  </code></pre>
  
  <p>Standard ActiveForm with 1 field in View (can't paste it here properly for some reason, sorry). Do I need to add another files code? What can be the problem?</p>
  
  <p><strong>UPD:</strong> When I create new User, it is created with <strong>empty fields</strong> whether I write there something or not.</p>