Can someone help me, I'm trying to parse the first two digits of a Users Postcode and add to beginning of their User ID.
I have a snippet called [[userID]]
$digits = $modx->getOption('zip',$scriptProperties,false);
if (empty($zip)) return '';
$firstdigits = substr($digits, -2);
then I am calling this in to a user profile with the following
<tr><th style="width: 150px"><b>Customer Account ID:</b></th><td>[[userID]][[+id]]</td></tr>
It isn't returning any digits from the zip code, only showing the userID number.
Am I doing something wrong when calling the zip code into the array.