@@ 45-54 (lines=10) @@ | ||
42 | * @getCreateUserName |
|
43 | * @return null|\yii\db\ActiveQuery |
|
44 | */ |
|
45 | public function getCreateUserName() |
|
46 | { |
|
47 | /* @var $owner BaseActiveRecord */ |
|
48 | $owner = $this->owner; |
|
49 | ||
50 | if ($owner->hasAttribute($this->createdByAttribute) && $owner->hasAttribute($this->updatedByAttribute)) { |
|
51 | return $this->createUser ? $this->createUser->username : '- no user -'; |
|
52 | } |
|
53 | ||
54 | return null; |
|
55 | } |
|
56 | ||
57 | /** |
|
@@ 77-86 (lines=10) @@ | ||
74 | * @getUpdateUserName |
|
75 | * @return null|\yii\db\ActiveQuery |
|
76 | */ |
|
77 | public function getUpdateUserName() |
|
78 | { |
|
79 | /* @var $owner BaseActiveRecord */ |
|
80 | $owner = $this->owner; |
|
81 | ||
82 | if ($owner->hasAttribute($this->createdByAttribute) && $owner->hasAttribute($this->updatedByAttribute)) { |
|
83 | return $this->createUser ? $this->updateUser->username : '- no user -'; |
|
84 | } |
|
85 | ||
86 | return null; |
|
87 | } |
|
88 | } |