public static function getRoleById($id)
{
$role = self::findFirst(['conditions' => 'id = :id:', 'bind' => ['id' => $id], 'columns' => ['role'], 'cache' => ['key' => HOST_HASH . md5('Admin\\Model\\AdminUser::getRoleById::' . $id), 'lifetime' => 60]]);
if ($role) {
return $role->role;
} else {
return 'guest';
}
}