Define a table, UserImages, with two fields:
Image : a container field
Account Name : A text field storing the user's picture
Define a global container field, gUserImage in one of your tables. It can be defined in any table.
Write this script and set it to run every time the file is opened or add this code to a script that you are already performing when the file is opened:
Go to Layout [UserImages]
Enter Find Mode 
Set Field [UserImages::Account name ; get ( AccountName ) ]
Set Error Capture [on]
Perform Find 
Set field [Globals::gUserImage ; UserImages::Image ]
Go to Layout [Specify the layout where you want your user to start each time they open the file.]
Now you can place gUserImage on any layout where you want to display the user's image.
Thanks, this makes sense except for "Account Name : A text field storing the user's picture".
How do I create a text field that stores a picture?
I think it was just a typo. You enter the Account Name in a text field, and store the picture appropriate for that Account Name in the Image field. When the user logs in you capture their Account Name (not the user name) and use it to search for the correct record in that table.
Thanks for the assist Sorbsbuster. That was a typo I meant that account name stores what the name of the field indicates::the account name. This is the minimum fields needed to get this to work. You may find including other fields--such as the person's name in a name field useful.
Thank you both! I have this working now.
You may want to add an = sign (or two...) in front of the Set Field in the Find, if there is any possibility that you will have a user John Wayne and another user Wayne Johnston.
Thanks, Sorbsbuster. Forgive my inexperience, but I'm not exactly sure how to include these = signs.
That line reads: Set Field [UserImages::Account name ; get ( AccountName ) ]
I'm using the script editor, how do I put these in?
Set Field [UserImages::Account name ; "==" & get ( AccountName ) ]
Got it -- thanks, again!
I noticed this doesn't work with instant web publishing -- is there a way around that?
If the images are not "store a reference" it should work in IWP also.
With "store a reference" there's a specific folder that must contain the image files or the images will not be visible in the container fields.
I don't believe they are. I first just dragged them into the file, and then also inserted the images through the menu, making sure "store as reference" was not selected. I am seeing the image associated with the user who is sharing the database, but that image appears even if other users log on via iwp.
Double-check that your table UserImages has one record per user account, and one distinct image per record. These image fields are not global. The image that is displayed is a global image, picked up and set from the appropriate record in the UserImage table.
Did the script that loads the container fields file run to update the global field?
Do you have the script set in FileOptions to run each time the file is opened?