The Toolkit for Online Communities
18811 Community Members, 0 members online, 1877 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Development : Set "Send email to this user" by default : One Message

Forum OpenACS Development: Re: Set "Send email to this user" by default

Posted by Iuri Sampaio on
I found what page is calling the proc

Then i went to the APIdocs and found the proc email_image::get_user_email

I went to the code and changed the default value in the procedure:

if { $user_level == 5 } {
# We get the privacy level from PrivateEmailLevelP parameter

set priv_level [parameter::get_from_package_key -
package_key "acs-subsite" - parameter "PrivateEmailLevelP" -default 2]
} else {


but it didn't work. i registered a test user and it came up the old one its email on option 4- Show my email as text

any clues?

Posted by Iuri Sampaio on
by the way,
i reloaded the change i made
Posted by Iuri Sampaio on
it has been great playing with the code. I just make the mess then the error comes up and I understand how the pieces work...

By the way i was totaly wrong,
the page "packages/acs-subsite/www/members/index.tcl"
just call the api to list the info

The default value to display emails has to be set in the procedure that generates the user info and how it will display.

I browsed


But i couldn't find yet

Posted by Iuri Sampaio on
So far,

I found auth::create_local_account (public)

and this line of code in the procedure:

# Default a local account username
if { $user_info(authority_id) == [auth::authority::local] && [auth::UseEmailForLoginP] && [empty_string_p $username] } {

# Generate a username that's guaranteed to be unique

took me to auth::UseEmailForLoginP

which i have
return [parameter::get -boolean -parameter UseEmailForLoginP -package_id [ad_acs_kernel_id] -default 1]


then i set the defuealt value "2" that corresponds to "Send-email-to this-user"

create the user. but it didn;t work