25], [['email', 'unconfirmed_email'], 'string', 'max' => 255], [['fio'], 'string', 'max' => 50], [['at_org'], 'string', 'max' => 30], [['member_phone', 'fax'], 'string', 'max' => 12], [['password_hash'], 'string', 'max' => 60], [['auth_key'], 'string', 'max' => 32], [['registration_ip'], 'string', 'max' => 45], [['username'], 'unique'], [['email'], 'unique'] ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => Yii::t('app', 'ID'), 'username' => Yii::t('app', 'Username'), 'role' => Yii::t('app', 'Role'), 'email' => Yii::t('app', 'Email'), 'fio' => Yii::t('app', 'Fio'), 'at_org' => Yii::t('app', 'At Org'), 'org_type' => Yii::t('app', 'Org Type'), 'member_phone' => Yii::t('app', 'Member Phone'), 'fax' => Yii::t('app', 'Fax'), 'status' => Yii::t('app', 'Status'), 'password_hash' => Yii::t('app', 'Password Hash'), 'auth_key' => Yii::t('app', 'Auth Key'), 'confirmed_at' => Yii::t('app', 'Confirmed At'), 'unconfirmed_email' => Yii::t('app', 'Unconfirmed Email'), 'blocked_at' => Yii::t('app', 'Blocked At'), 'registration_ip' => Yii::t('app', 'Registration Ip'), 'created_at' => Yii::t('app', 'Created At'), 'updated_at' => Yii::t('app', 'Updated At'), 'flags' => Yii::t('app', 'Flags'), ]; } /** * @return \yii\db\ActiveQuery */ public function getSocialAccounts() { return $this->hasMany(SocialAccount::className(), ['user_id' => 'id']); } /** * @return \yii\db\ActiveQuery */ public function getTokens() { return $this->hasMany(Token::className(), ['user_id' => 'id']); } }