<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sugarlabs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Joe.kelleher</id>
	<title>Sugar Labs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sugarlabs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Joe.kelleher"/>
	<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/go/Special:Contributions/Joe.kelleher"/>
	<updated>2026-05-13T18:51:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/sugar.profile&amp;diff=18322</id>
		<title>Development Team/Almanac/sugar.profile</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/sugar.profile&amp;diff=18322"/>
		<updated>2009-01-07T10:41:22Z</updated>

		<summary type="html">&lt;p&gt;Joe.kelleher: /* How do I get the school server with which this child is associated? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Sugar Almanac}}&lt;br /&gt;
&lt;br /&gt;
The profile package can be used to get access to user specific details such as his/her nick_name, XO colors, public key, etc. Much of these details are accessed by first creating a Profile object. However, there are several shortcut helper functions that provide access to some user details directly. &lt;br /&gt;
&lt;br /&gt;
= Helper Functions = &lt;br /&gt;
&lt;br /&gt;
=== How do I get the user&#039;s nick name? ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from sugar import profile &lt;br /&gt;
...&lt;br /&gt;
        #prof will refer to a Profile object used to access user information&lt;br /&gt;
        prof = profile.get_profile()&lt;br /&gt;
&lt;br /&gt;
        # Two ways to print nickname: either through profile object, or through a helper funciton in sugar.profile&lt;br /&gt;
        print prof.nick_name&lt;br /&gt;
        print profile.get_nick_name()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How do I get the XO colors set by the user? ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from sugar import profile &lt;br /&gt;
...&lt;br /&gt;
        #prof will refer to a Profile object used to access user information&lt;br /&gt;
        prof = profile.get_profile()&lt;br /&gt;
&lt;br /&gt;
        # Two ways to get the XO colors: through profile object or using helper function&lt;br /&gt;
        print prof.color.to_string()&lt;br /&gt;
        print profile.get_color().to_string()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How do I access this XO&#039;s public key? ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from sugar import profile &lt;br /&gt;
...&lt;br /&gt;
        #prof will refer to a Profile object used to access user information&lt;br /&gt;
        prof = profile.get_profile()&lt;br /&gt;
&lt;br /&gt;
        #Two ways to get the public key for this XO: through Profile object or with helper function&lt;br /&gt;
        print prof.pubkey&lt;br /&gt;
        print profile.get_pubkey()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Class: Profile =&lt;br /&gt;
&lt;br /&gt;
=== How do I get the nick name, color and public key information for this XO? ===&lt;br /&gt;
See the documentation for [[#Helper Functions | Helper Functions]].&lt;br /&gt;
&lt;br /&gt;
=== How do I get the school server with which this child is associated? ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from sugar import profile&lt;br /&gt;
...&lt;br /&gt;
        #prof will refer to a Profile object used to access user information&lt;br /&gt;
        prof = profile.get_profile()&lt;br /&gt;
&lt;br /&gt;
        #Print out the name of the school server this XO is registered with&lt;br /&gt;
        print prof.jabber_server&lt;br /&gt;
        #Print out whether this XO is actually registered with a school server&lt;br /&gt;
        print prof.jabber_registered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Joe.kelleher</name></author>
	</entry>
</feed>