Index: openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 28 Aug 2003 13:23:57 -0000 1.20 +++ openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 2 Sep 2003 12:02:11 -0000 1.21 @@ -421,28 +421,33 @@ @param array The name of an array into which you want the information put. The attributes returned are: - user_id, - first_names, - last_name, - name (first_names last_name), - email, - url, - screen_name, - priv_name, - priv_email, - email_verified_p, - email_bouncing_p, - no_alerts_until, - last_visit, - second_to_last_visit, - n_sessions, - password_question, - password_answer, - password_changed_date, - member_state, - rel_id, - bio (if -include_bio switch is present) + + @author Lars Pind (lars@collaboraid.biz) } { if { [empty_string_p $user_id] } { @@ -457,6 +462,29 @@ } } +ad_proc -public acs_user::get_element { + {-user_id {}} + {-element:required} +} { + Get a particular element from the basic information about a user returned by acs_user::get. + Throws an error if the element does not exist. + + @option user_id The user_id of the user to get the bio for. Leave blank for current user. + + @option element Which element you want to retrieve. + + @return The element asked for. + + @see acs_user::get +} { + acs_user::get \ + -user_id $user_id \ + -array row \ + -include_bio=[string equal $element "bio"] + + return $row($element) +} + ad_proc -public acs_user::update { {-user_id:required} {-screen_name}