On a site I have profile pictures setup and if a picture is added to the user registration form and the filepath is changed via the admin configuration the token values for $user do not take effect. For instance if you have the value [user] then the filepath is saved with "Anonymous" and the [uid] is saved as 0. If a user edits the image after creating an account all works fine though.

I didn't need these tokens to work but needed some form of unique identifier for the image as some tokens for some other profile fields are being used for the naming convention. I made a quick patch for adding a UNIX timestamp to the tokens available which solved my problem. Patch attached.

CommentFileSizeAuthor
profile_pictures_unix-token.patch1014 byteskbasarab