Do you know of a way to display a message on every page when a user had not changed thier default image in there profile. Once there profile has changed then I no longer wish to show the message.
1 Answer
There wouldn't be anyway to do this without writing custom code. If going the custom code route you could create a Visual Studio Web Part. Have it check the profile of the user to see if it is blank or null. They display the message in the web part. Here is one way to access the profile picture through code: http://mysharepointwork.blogspot.com/2010/11/sharepoint-2010-show-user-profile.html
-
Here is an example of how to get the profile picture using the JavaScript client object model: learningsharepoint.com/2010/07/19/… Oct 5, 2011 at 15:06
-
With the JavaScript route, you could just add a Content Editor Web Part and add your JavaScript code there. Thus making it so you don't need to deploy a custom web part from Visual Studio. Oct 5, 2011 at 15:07
-
1You could use the JavaScript OM reference that John posted above to check to see if it's the default image, and output a alert to the user stating they need to update it. You could push it to the SPNotification API to generate an alert bar and integrate it nicely into SharePoint.– webdes03Oct 5, 2011 at 18:27
-
Agreed. Using the alert bar would be an excellent choice. You can generate those with JavaScript or C#. Oct 5, 2011 at 21:56