[Zope3-dev] Make principals display userinfo about themselves

Stephan Richter srichter at cosmos.phy.tufts.edu
Sun Sep 26 20:58:15 EDT 2004


On Sunday 26 September 2004 13:22, Florian Lindner wrote:
> in webapplications you can very often get a UserProfile page with some
> infos about the user.
> Can I enhance principals in a way that they display their own profile?

Of course.

> (these profiles should be accessible by all authenticated users).
> The first problem I see is that user instances live in software space
> and therefore are only accessible for managers TTW. So this path to a
> user is useless:
> http://localhost:8080/++etc++site/default/AuthenticationService/PrincipalSo
>urce/sampleuser. What would be the best way to achieve that? Just using a
> ZPT with
> userinfo.zpt/sampleuser (sampleuser as a argument to userinfo.zpt)?

You do not need to access or even should access the current principal via this 
path. The authenticated principal is stored in the request and the 
participation. You can simply register templates as resources that use the 
request to extract all user information. See my previous mail on how to store 
data on a principal.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-dev mailing list