Graham Quince Posted July 12, 2019 Share Posted July 12, 2019 I'll probably end up turning this into a widget, but in the meantime, if you want to display the user's picture when they log in: <div class="userpic"></div> <script> var user = FrogOS ? FrogOS.getUser() : this.getUser(); Frog.Model.api('users.getOne', { uuid: user.uuid }).done(function(listResponse) { var photo = listResponse.data.categories[0].fields[6].value; if (!photo) { photo = "users/public/images/default_no_gender.png"; } this.element.find('.userpic').html( '<img style="width: 150px; max-height: 150px;" src="'+photo+'">' ) }.bind(this)); </script> Link to comment Share on other sites More sharing options...
ADT Posted July 12, 2019 Share Posted July 12, 2019 And to include year group...... and form class....... you need too....... ? 1 Link to comment Share on other sites More sharing options...
Graham Quince Posted July 24, 2019 Author Share Posted July 24, 2019 I think we should ignore my original post here. I've competely missed it - looks like the field thumbnail is in FrogOS.getUser(); <div class="userpic"></div> <script> var user = FrogOS ? FrogOS.getUser() : this.getUser(); this.element.find('.userpic').html( '<img style="width: 150px; max-height: 150px;" src="'+user.thumbnail+'">' ) </script> 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