PMDF popstore & MessageStore Manager's Guide


Previous Next Contents Index

4.3.4.17 show_user Command: show a user account

The show_user command is used to display information about a given user. The parameter names and associated values accepted by the command are listed in Table 4-23.

Table 4-23 show_user command parameters
parameter=value   Description
mformat=file-spec Optional Name of the formatting file to use to format each message reference in the account's list of stored messages. The recognized substitution strings for this formatting file are listed in Tables 4-10 and 4-24.
on_error=file-spec Required Name of the formatting file to use to format the results when the command fails.
on_success=file-spec Required Name of the formatting file to use to format the results when the command succeeds.
pformat=file-spec Required Name of the formatting file to use to format each account listing. The recognized substitution strings for this formatting file are listed in Table 4-10 and 4-15.
username=string Required Name of the account to display. string has a maximum length of 32 bytes. Wild cards are not permitted.

The username parameter can appear more than once in which case information for each account will be displayed.

An example command to display the jdoe account is shown below:


command=show_user&username=jdoe&pformat=susr.txt&mformat=smsg.txt 
  on_success=susr_success.txt&on_error=susr_error.txt 
Sample formatting files are shown in Example 4-5 and Example 4-6. These are the formatting files used by the interactive command line management utility.

Example 4-5 show_users account formatting file

 
Username:           %username 
Owner:              %owner 
Group:              %group_name 
Store Type:         %store 
Usage flags:        %flags 
Site-defined:       %private 
 
Last pwd change:    %last_pwd_change 
Last connect:       %last_connect 
Last disconnect:    %last_disconnect 
Total connect time: %total_connect_dhms 
Total connections:  %total_connections 
Past block days:    %past_block_days 
Last billing:       %last_billing 
 
Message count:      %message_count{%10u} (%received_messages total message%s received) 
Quota used:         %quota_used_k{%10.2f} Kbyte%s 
Primary quota:      %quota_k{%10.2f} Kbyte%s 
Overdraft quota:    %overdraft_k{%10.2f} Kbyte%s 
 

Example 4-6 show_users message list formatting file

%none{User has no stored messages} 
%msgr_id{%4u}. Filename: %msgr_filename 
      Received: %msgr_created 
      Size:     %msgr_size_k K 
      Flags:    %msgr_flags 
 

The formatting field for the %msgr_flags_read substitution string works differently from other substitution strings. The formatting field is interpreted as two strings separated by a vertical bar, |. The first string is that substituted when the message read flag is not set and the second string that when the field is set. For instance, the formatting instructions


Message read: %msgr_flags_read{No|Yes} 
produces the output


Message read: No 
for a message not marked as read. For a message which is marked as having been read, the output would instead be


Message read: Yes 

Table 4-24 show_user mformat command substitution strings
Substitution string Type Format Description
%msgr_created string %s Creation date and time for the referenced message file.
%msgr_filename string %-s Name of the message file containing the referenced message.
%msgr_flags string %s Comma separated string representation of flags associated with the state of the message. Presently the only flag is READ which appears when the message is marked as having been read.
%msgr_flags_read string Unread|Read See text.
%msgr_id uint32 %u Index of the message in the list of stored messages. The first message has an index of 1, the second an index of 2, etc.
%msgr_size_b uint32 %u Size in bytes of the message content.
%msgr_size_k
%msgr_size_m
%msgr_size_g
float %.2f Size of the message content as measured, respectively, in kbytes ( _k), mbytes ( _m), or gbytes ( _g).
%msgr_uidl string %-s UIDL for this instance of the message.


Previous Next Contents Index