Browse Source

Advanced app `User` model code style fixes

tags/2.0.0-rc
Alexander Kochetov 10 years ago
parent
commit
fed61f7d96
  1. 9
      apps/advanced/common/models/User.php

9
apps/advanced/common/models/User.php

@ -3,6 +3,7 @@ namespace common\models;
use Yii;
use yii\base\NotSupportedException;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
use yii\web\IdentityInterface;
@ -41,13 +42,7 @@ class User extends ActiveRecord implements IdentityInterface
public function behaviors()
{
return [
'timestamp' => [
'class' => 'yii\behaviors\TimestampBehavior',
'attributes' => [
ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'],
ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
],
],
TimestampBehavior::className(),
];
}

Loading…
Cancel
Save