def get_user_info_cookie_data(request):
 user = request.user
 header_urls = {u'logout': reverse(u'logout')}
 try:
  header_urls[u'account_settings'] = reverse(u'account_settings')
  header_urls[u'learner_profile'] = reverse(u'learner_profile', kwargs={u'username': user.username})
 except NoReverseMatch:
  pass
 for (url_name, url_path) in six.iteritems(header_urls):
  header_urls[url_name] = request.build_absolute_uri(url_path)
 user_info = {u'version': settings.EDXMKTG_USER_INFO_COOKIE_VERSION, u'username': user.username, u'header_urls': header_urls, u'enrollmentStatusHash': CourseEnrollment.generate_enrollment_status_hash(user)}
 return user_info

def get_user_info_cookie_data ( request ) : user = request . user header_urls = { u'logout' : reverse ( u'logout' ) } try : header_urls [ u'account_settings' ] = reverse ( u'account_settings' ) header_urls [ u'learner_profile' ] = reverse ( u'learner_profile' , kwargs = { u'username' : user . username } ) except NoReverseMatch : pass for ( url_name , url_path ) in six . iteritems ( header_urls ) : header_urls [ url_name ] = request . build_absolute_uri ( url_path ) user_info = { u'version' : settings . EDXMKTG_USER_INFO_COOKIE_VERSION , u'username' : user . username , u'header_urls' : header_urls , u'enrollmentStatusHash' : CourseEnrollment . generate_enrollment_status_hash ( user ) } return user_info
returns information that wil populate the user info cookie .