- /**
- * maps legacy direct access to last poster's user profile data to the real
- * user profile property names
- * @var string[]
- * @deprecated
- */
- protected static $__lastUserAvatarPropertyMapping = [
- 'lastPosterAvatarID' => 'avatarID',
- 'lastPosterAvatarName' => 'avatarName',
- 'lastPosterAvatarExtension' => 'avatarExtension',
- 'lastPosterAvatarWidth' => 'width',
- 'lastPosterAvatarHeight' => 'height',
- 'lastPosterEmail' => 'email',
- 'lastPosterDisableAvatar' => 'disableAvatar',
- 'lastPosterEnableGravatar' => 'enableGravatar',
- 'lastPosterGravatarFileExtension' => 'gravatarFileExtension',
- 'lastPosterAvatarFileHash' => 'fileHash',
- ];
-
- /**
- * @inheritDoc
- * @deprecated
- */
- public function __get($name)
- {
- $value = parent::__get($name);
- if ($value !== null) {
- return $value;
- } elseif (\array_key_exists($name, $this->object->data)) {
- return;
- }
-
- /** @noinspection PhpVariableVariableInspection */
- $value = $this->getUserProfile()->{$name};
- if ($value !== null) {
- return $value;
- }
-
- if (isset(static::$__lastUserAvatarPropertyMapping[$name])) {
- return $this->getLastPosterProfile()->getAvatar()->{static::$__lastUserAvatarPropertyMapping[$name]};
- }
- }
-