Skip to content

Instantly share code, notes, and snippets.

View opengeek's full-sized avatar

Jason Coward opengeek

View GitHub Profile
<?php
$output = $input;
$limit = intval($options) ? intval($options) : 100;
if (function_exists('mb_strlen')) {
if (mb_strlen($output, $encoding) > $limit) {
$output = mb_substr($output, 0, $limit, $encoding) . '&hellip;';
}
} else if (strlen($output) > $limit) {
$output = substr($output, 0, $limit) . '&hellip;';
}
<?php
/**
* An extension to modUser that allows Atlassian Crowd integration via SOAP.
*
* @todo Complete this class to handle all external user management tasks
* allowed with Crowd.
*
* @package modx
* @subpackage user.crowd
*/