public static function CategorizeUsersList($users) {
        $list = array();
        if (is_array($users) && count($users) > 0) {
            foreach ($users as $user) {
                $userType = $user->user_type();
                $list[$userType][] = $user;
            }
        }
        return $list;
    }
public static function CategorizeUsersList($users) {
        $list = array();
        if (is_array($users) && count($users) > 0) {
            foreach ($users as $user) {
                $userType = $user->user_type();
                $list[$userType][] = $user;
            }
        }
        return $list;
    }
public static function CategorizeUsersList ( $ users ) { $ list = array ( ) ; if ( is_array ( $ users ) && count ( $ users ) > 0 ) { foreach ( $ users as $ user ) { $ userType = $ user -> user_type ( ) ; $ list [ $ userType ] [ ] = $ user ; } } return $ list ; }
Categorize user list by type
Categorize user list by type