add multiple identicon drivers support, add icon field settings, make icons display optional

This commit is contained in:
ghost 2023-08-29 21:51:16 +03:00
parent edf9149654
commit 6bffa1c6b9
3 changed files with 16 additions and 7 deletions

View file

@ -31,7 +31,7 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
switch (isset($_GET['toggle']) ? $_GET['toggle'] : false)
{
case 'identicon':
case 'jidenticon':
// Yggdrasil connections only
if (!preg_match(YGGDRASIL_URL_REGEX, $_SERVER['REMOTE_ADDR']))
@ -62,7 +62,7 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
$icon = new Jdenticon\Identicon();
$icon->setValue($user->address);
$icon->setValue($user->{USER_IDENTICON_FIELD});
$icon->setSize(empty($_GET['size']) ? 100 : (int) $_GET['size']);
$icon->setStyle(
[