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.81 -r1.82 --- openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 30 May 2018 14:43:29 -0000 1.81 +++ openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 19 Jun 2018 13:54:33 -0000 1.82 @@ -27,15 +27,15 @@ } { return [db_0or1row contact_person_exists_p {select 1 from persons where person_id = :party_id}] } - + ad_proc -public person::new { {-first_names:required} {-last_name:required} {-email {}} } { create a new person } { - + set extra_vars [ns_set create] ns_set put $extra_vars first_names $first_names ns_set put $extra_vars last_name $last_name @@ -54,15 +54,15 @@ } ad_proc -public person::get { - {-person_id:required} + {-person_id:required} } { get info for a person as a Tcl array in list form } { db_1row get_person { select * from persons where person_id = :person_id } -column_array person - set person(person_name) "$person(first_names) $person(last_name)" + set person(person_name) "$person(first_names) $person(last_name)" return [array get person] } @@ -137,11 +137,11 @@ @option person_id The person_id of the person to get the bio for. Leave blank for currently logged in user. - - @option exists_var The name of a variable in the caller's namespace, which will be set to 1 + + @option exists_var The name of a variable in the caller's namespace, which will be set to 1 if the bio column is not null. Leave blank if you're not interested in this information. - + @return The bio of the user as a text string. @author Lars Pind (lars@collaboraid.biz) @@ -156,9 +156,9 @@ set person [person::get -person_id $person_id] set bio [dict get $person bio] - + set exists_p [expr {$bio ne ""}] - + return $bio } @@ -223,7 +223,7 @@ {-permanent:boolean} } { Delete a user - + @param permanent If provided the user will be deleted permanently from the database. Otherwise the user state will merely be set to "deleted". @@ -253,7 +253,7 @@ {-username:required} } { Returns user_id from authority and username. Returns the empty string if no user found. - + @param authority_id The authority. Defaults to local authority. @param username The username of the user you're trying to find. @@ -274,7 +274,7 @@ if {$user_id eq ""} { ns_cache flush user_info_cache $key } - + return $user_id } @@ -283,15 +283,15 @@ {-username:required} } { Returns user_id from authority and username. Returns the empty string if no user found. - + @param authority_id The authority. Defaults to local authority. @param username The username of the user you're trying to find. @return user_id of the user, or the empty string if no user found. } { return [db_string user_id_from_username {} -default {}] -} +} ad_proc -public acs_user::get { {-user_id {}} @@ -301,20 +301,20 @@ {-include_bio:boolean} } { Get basic information about a user. Uses util_memoize to cache info from the database. - You may supply either user_id, or username. + You may supply either user_id, or username. If you supply username, you may also supply authority_id, or you may leave it out, in which case it defaults to the local authority. If you supply neither user_id nor username, and we have a connection, the currently logged in user will be assumed. @option user_id The user_id of the user to get the bio for. Leave blank for current user. - + @option include_bio Whether to include the bio in the user information - @param array The name of an array into which you want the information put. - - The attributes returned are: + @param array The name of an array into which you want the information put. + The attributes returned are: +