Changes between Version 1 and Version 2 of UserManagerPlugin


Ignore:
Timestamp:
Jan 29, 2008 11:59:57 AM (6 years ago)
Author:
cbalan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserManagerPlugin

    v1 v2  
    3030 
    3131== Example == 
     32{{{ 
     33#!python 
    3234 
    3335from tracusermanager.api import UserManager, User 
    3436 
    3537# Get user by id(username) 
    36 user = UserManager(env).get_user( "cbalan" ) 
     38user = UserManager(env).get_user( "cbalan" ) 
    3739 
    3840# Get active users 
     
    4042 
    4143# Search users ( Dummy example: All active developers that have an gmail account ) 
    42 search_result_list = UserManager(env).search_users(User( role="developer", email="%gmail.com")) 
     44search_result_list = UserManager(env).search_users(User( role="developer", email="%gmail.com")) 
    4345 
    4446# Create new user 
    45 UserManager(self.env).create_user(User(username='cbalan', name="Catalin Balan", email='cbalan@optaros.com')) 
     47UserManager(self.env).create_user(User(username="cbalan", name="Catalin Balan", email="cbalan@optaros.com")) 
    4648 
    4749# Update 
    4850user = UserManager(self.env).get_user('cbalan') 
    49 user['bio']="""Maecenas ut mauris. Morbi congue nunc ut tortor. Pellentesque molestie cursus enim.  
     51user['bio']="""Maecenas ut mauris. Morbi congue nunc ut tortor. Pellentesque molestie cursus enim.  
    5052Praesent gravida consequat mauris. Nulla cursus cursus magna.  
    5153Sed libero. Integer dapibus urna in mauris.  
     
    5860Nullam dui. Nullam egestas, massa eu condimentum mattis, enim ipsum tincidunt purus,  
    5961vitae vestibulum sapien eros vitae libero. 
    60 """ 
     62""" 
    6163user.save() 
    6264 
     
    6466UserManager(env).remove_user(user) 
    6567 
    66  
     68}}} 
    6769== Recent Changes == 
    6870