CBPHelper :: convertToExtendedGroups: Bitrix method

      
<?php 
//  CBPHelper :: convertToExtendedGroups()
//  /dist/bitrix/modules/bizproc/classes/general/helper.php:2244

    
public static function convertToExtendedGroups($users)
    {
        
$users = (array)$users;
        foreach (
$users as &$user)
        {
            if (!
is_scalar($user))
                continue;
            
$user = (string) $user;
            if (
strpos($user'user_') === 0)
            {
                
$user 'group_u'.substr($userstrlen('user_'));
            }
            elseif (
preg_match('#^[0-9]+$#'$user))
            {
                
$user 'group_g'.$user;
            }
            else
                
$user strtolower($user);
        }
        return 
$users;
    }