|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* _ __ __ _____ _____ ___ ____ _____ |
|
5
|
|
|
* | | / // // ___//_ _// || __||_ _| |
|
6
|
|
|
* | |/ // /(__ ) / / / /| || | | | |
|
7
|
|
|
* |___//_//____/ /_/ /_/ |_||_| |_| |
|
8
|
|
|
* @link https://vistart.me/ |
|
9
|
|
|
* @copyright Copyright (c) 2016 - 2017 vistart |
|
10
|
|
|
* @license https://vistart.me/license/ |
|
11
|
|
|
*/ |
|
12
|
|
|
|
|
13
|
|
|
namespace rhosocial\user; |
|
14
|
|
|
|
|
15
|
|
|
use Yii; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* This is the model class for view "{{%userprofileview}}". |
|
19
|
|
|
* That is, you can only use this model to read. |
|
20
|
|
|
* |
|
21
|
|
|
* @property resource $guid |
|
22
|
|
|
* @property string $id |
|
23
|
|
|
* @property string $pass_hash |
|
24
|
|
|
* @property resource $ip |
|
25
|
|
|
* @property integer $ip_type |
|
26
|
|
|
* @property string $created_at |
|
27
|
|
|
* @property string $updated_at |
|
28
|
|
|
* @property string $auth_key |
|
29
|
|
|
* @property string $access_token |
|
30
|
|
|
* @property string $password_reset_token |
|
31
|
|
|
* @property integer $status |
|
32
|
|
|
* @property integer $type |
|
33
|
|
|
* @property string $source |
|
34
|
|
|
* @property string $nickname |
|
35
|
|
|
* @property string $first_name |
|
36
|
|
|
* @property string $last_name |
|
37
|
|
|
* @property integer $gravatar_type |
|
38
|
|
|
* @property string $gravatar |
|
39
|
|
|
* @property integer $gender |
|
40
|
|
|
* @property string $timezone |
|
41
|
|
|
* @property string $individual_sign |
|
42
|
|
|
* @property string $profile_created_at |
|
43
|
|
|
* @property string $profile_updated_at |
|
44
|
|
|
*/ |
|
45
|
|
|
class UserProfileView extends \yii\db\ActiveRecord |
|
46
|
|
|
{ |
|
47
|
|
|
/** |
|
48
|
|
|
* @inheritdoc |
|
49
|
|
|
*/ |
|
50
|
|
|
public static function tableName() |
|
51
|
|
|
{ |
|
52
|
|
|
return '{{%userprofileview}}'; |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* @inheritdoc |
|
57
|
|
|
*/ |
|
58
|
|
|
public function rules() |
|
59
|
|
|
{ |
|
60
|
|
|
return [ |
|
61
|
|
|
[['guid', 'id', 'pass_hash', 'nickname', 'individual_sign'], 'required'], |
|
62
|
|
|
[['ip_type', 'status', 'type', 'gravatar_type', 'gender'], 'integer'], |
|
63
|
|
|
[['created_at', 'updated_at', 'profile_created_at', 'profile_updated_at'], 'safe'], |
|
64
|
|
|
[['individual_sign'], 'string'], |
|
65
|
|
|
[['guid', 'id', 'ip'], 'string', 'max' => 16], |
|
66
|
|
|
[['pass_hash'], 'string', 'max' => 80], |
|
67
|
|
|
[['auth_key', 'access_token', 'password_reset_token', 'source', 'nickname', 'first_name', 'last_name', 'gravatar', 'timezone'], 'string', 'max' => 255], |
|
68
|
|
|
]; |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
/** |
|
72
|
|
|
* @inheritdoc |
|
73
|
|
|
*/ |
|
74
|
|
|
public function attributeLabels() |
|
75
|
|
|
{ |
|
76
|
|
|
return [ |
|
77
|
|
|
'guid' => Yii::t('user', 'GUID'), |
|
78
|
|
|
'id' => Yii::t('user', 'User ID'), |
|
79
|
|
|
'pass_hash' => Yii::t('user', 'Password Hash'), |
|
80
|
|
|
'ip' => Yii::t('user', 'IP Address'), |
|
81
|
|
|
'ip_type' => Yii::t('user', 'IP Address Type'), |
|
82
|
|
|
'created_at' => Yii::t('user', 'Created At'), |
|
83
|
|
|
'updated_at' => Yii::t('user', 'Updated At'), |
|
84
|
|
|
'auth_key' => Yii::t('user', 'Authentication Key'), |
|
85
|
|
|
'access_token' => Yii::t('user', 'Access Token'), |
|
86
|
|
|
'password_reset_token' => Yii::t('user', 'Password Reset Token'), |
|
87
|
|
|
'status' => Yii::t('user', 'Status'), |
|
88
|
|
|
'type' => Yii::t('user', 'Type'), |
|
89
|
|
|
'source' => Yii::t('user', 'Source'), |
|
90
|
|
|
'nickname' => Yii::t('user', 'Nickname'), |
|
91
|
|
|
'first_name' => Yii::t('user', 'First Name'), |
|
92
|
|
|
'last_name' => Yii::t('user', 'Last Name'), |
|
93
|
|
|
'gravatar_type' => Yii::t('user', 'Gravatar Type'), |
|
94
|
|
|
'gravatar' => Yii::t('user', 'Gravatar'), |
|
95
|
|
|
'gender' => Yii::t('user', 'Gender'), |
|
96
|
|
|
'timezone' => Yii::t('user', 'Timezone'), |
|
97
|
|
|
'individual_sign' => Yii::t('user', 'Individual Sign'), |
|
98
|
|
|
'profile_created_at' => Yii::t('user', 'Profile Created At'), |
|
99
|
|
|
'profile_updated_at' => Yii::t('user', ' Profile Updated At'), |
|
100
|
|
|
]; |
|
101
|
|
|
} |
|
102
|
|
|
|
|
103
|
|
|
public function delete() { |
|
104
|
|
|
return false; |
|
105
|
|
|
} |
|
106
|
|
|
|
|
107
|
|
|
public function insert($runValidation = true, $attributes = null) { |
|
108
|
|
|
return false; |
|
109
|
|
|
} |
|
110
|
|
|
|
|
111
|
|
|
public function update($runValidation = true, $attributeNames = null) { |
|
112
|
|
|
return false; |
|
113
|
|
|
} |
|
114
|
|
|
|
|
115
|
|
|
public function save($runValidation = true, $attributeNames = null) { |
|
116
|
|
|
return false; |
|
117
|
|
|
} |
|
118
|
|
|
} |
|
119
|
|
|
|