#NEWLINE# def get_user_by_id( self , id ) : #NEWLINE# #INDENT# cursor = self . sql_cnx . cursor ( ) #NEWLINE# login_name = 'login_name' #NEWLINE# real_name = 'realname' #NEWLINE# user_id = 'userid' #NEWLINE# request = ( 'SELECT %s, %s, %s FROM profiles WHERE userid = %s' % ( user_id , real_name , user_id , id ) ) #NEWLINE# cursor . execute ( request ) #NEWLINE# result = cursor . fetchone ( ) #NEWLINE# user = BzUser ( result [ user_id ] ) #NEWLINE# user . login = result [ login_name ] #NEWLINE# user . email = result [ login_name ] #NEWLINE# user . full_name = result [ real_name ] #NEWLINE# return user