Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Kanboard\User\Avatar; use Kanboard\Core\Base; use Kanboard\Core\User\Ava..
Decoded Output download
<?php
namespace Kanboard\User\Avatar;
use Kanboard\Core\Base;
use Kanboard\Core\User\Avatar\AvatarProviderInterface;
/**
* Avatar Local Image File Provider
*
* @package avatar
* @author Frederic Guillot
*/
class AvatarFileProvider extends Base implements AvatarProviderInterface
{
/**
* Render avatar html
*
* @access public
* @param array $user
* @param int $size
* @return string
*/
public function render(array $user, $size)
{
$url = $this->helper->url->href('AvatarFileController', 'image', array('user_id' => $user['id'], 'hash' => md5($user['avatar_path'].$size), 'size' => $size));
$title = $this->helper->text->e($user['name'] ?: $user['username']);
return '<img src="' . $url . '" alt="' . $title . '" title="' . $title . '">';
}
/**
* Determine if the provider is active
*
* @access public
* @param array $user
* @return boolean
*/
public function isActive(array $user)
{
return !empty($user['avatar_path']);
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Kanboard\User\Avatar;
use Kanboard\Core\Base;
use Kanboard\Core\User\Avatar\AvatarProviderInterface;
/**
* Avatar Local Image File Provider
*
* @package avatar
* @author Frederic Guillot
*/
class AvatarFileProvider extends Base implements AvatarProviderInterface
{
/**
* Render avatar html
*
* @access public
* @param array $user
* @param int $size
* @return string
*/
public function render(array $user, $size)
{
$url = $this->helper->url->href('AvatarFileController', 'image', array('user_id' => $user['id'], 'hash' => md5($user['avatar_path'].$size), 'size' => $size));
$title = $this->helper->text->e($user['name'] ?: $user['username']);
return '<img src="' . $url . '" alt="' . $title . '" title="' . $title . '">';
}
/**
* Determine if the provider is active
*
* @access public
* @param array $user
* @return boolean
*/
public function isActive(array $user)
{
return !empty($user['avatar_path']);
}
}
Function Calls
None |
Stats
MD5 | 24d2a164ba0679eb2fd52f5efea09f8c |
Eval Count | 0 |
Decode Time | 112 ms |