const objectId = this.#getObjectId();
void this.#cache.get(objectId).then((content) => {
+ if (content === "") {
+ return;
+ }
+
const container = this.#getContainer();
DomUtil.setInnerHtml(container, content);
timer.stop();
const objectId = this.#getObjectId();
void this.#cache.get(objectId).then((content) => {
+ if (content === "") {
+ return;
+ }
const container = this.#getContainer();
Util_1.default.setInnerHtml(container, content);
UiAlignment.set(container, this.#element, { vertical: "top" });
namespace wcf\action;
+use Laminas\Diactoros\Response\EmptyResponse;
use Laminas\Diactoros\Response\HtmlResponse;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
EOT,
);
- $userProfile = UserProfileRuntimeCache::getInstance()->getObject($parameters['id']);
- if ($userProfile) {
- WCF::getTPL()->assign('user', $userProfile);
- } else {
- WCF::getTPL()->assign('unknownUser', true);
+ $user = UserProfileRuntimeCache::getInstance()->getObject($parameters['id']);
+ if (!$user) {
+ return new EmptyResponse();
}
return new HtmlResponse(
- WCF::getTPL()->fetch('userProfilePreview'),
+ WCF::getTPL()->fetch('userCard', 'wcf', ['user' => $user]),
);
}
}