Graham Quince Posted August 21, 2018 Share Posted August 21, 2018 I've had a few minutes to mess around with code and managed to get the recipient's user details to display on their ePortfolio site: <div class="siterecipient"></div> <script> var siteName = this.element.closest('.sites-site-content').data('site-name'), siteNameArray = siteName.split(' - '), recipientUsername = siteNameArray[2], siterecipient = this.element.find(".siterecipient"); Frog.Model.api('users.getSummary', { search: recipientUsername, direction: 'asc', group_types: 'registration|year', sortBy: 'surname' }).done(function(listResponse) { var userdeets = listResponse.data[0].details; siterecipient.append( 'Name: '+userdeets.forename+" "+ userdeets.surname+"<br>"+ 'Sex: '+userdeets.gender+"<br>"+ '<img src="'+userdeets.thumbnail+'">' ); }); </script> Loads more to investigate on this and the username needs to be part of the site's title. In this iteration, it actually has to be the last part of the title. I'll do more work around this and try to get time to turn it into a FrogCode widget, but thought I'd share in the meantime. Remember - the service desk can work with you to get student photos uploaded. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now