- $content['timestamp'] = generateDateTime($content['timestamp'], '2');
- $content['category'] = getCategory($content['cat_id']);
- $content['points'] = translateComma($content['points']);
- $content['time'] = createFancyTime($content['time']);
- $content['userid'] = getUserId();
-
- // Get timestamp from insert
- $content['user_status'] = sprintf(getMessage('MEMBER_MAIL_NORMAL_CONFIRMED_ON'),
- generateDateTime(getTimestampFromUserStats('mailid', $content['id']), '2')
- );
+ $content['timestamp_ordered'] = generateDateTime($content['timestamp_ordered'], '2');
+ // @TODO This call cannot be saved as EL code cannot be "framed" in other EL code
+ $content['userid'] = getMemberId();
+ $content['user_mail_status'] = '{%message,MEMBER_MAIL_NORMAL_CONFIRMED_UNKNOWN=' . $content['id'] . '%}';
+
+ // Is ext-user active?
+ if (isExtensionActive('user')) {
+ // Default is never confirmed
+ $content['user_mail_status'] = '{%message,MEMBER_MAIL_NORMAL_NEVER_CONFIRMED=' . $content['id'] . '%}';
+
+ // Get the timestamp from the mail
+ $confirmedStamp = getEpocheTimeFromUserStats('mailid', $content['id']);
+
+ // Have confirmed it?
+ if ($confirmedStamp > 0) {
+ // Get timestamp from insert
+ $content['user_mail_status'] = '{%message,MEMBER_MAIL_NORMAL_CONFIRMED_ON=' . generateDateTime($confirmedStamp, '2') . '%}';
+ } // END - if
+ } // END - if