Home
The Toolkit for Online Communities
17219 Community Members, 1 member online, 2028 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

Collapse
Posted by Iuri Sampaio on
I found what page is calling the proc
home/conaje/conaje/packages/acs-subsite/www/members/index.tcl

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?

Collapse
Posted by Iuri Sampaio on
by the way,
i reloaded the change i made
Collapse
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
auth::create_user

http://www.openacs.org/api-doc/proc-view?proc=auth::create_user&source_p=1&version_id=

But i couldn't find yet

Collapse
Posted by Iuri Sampaio on
So far,

I found auth::create_local_account (public)
http://www.openacs.org/api-doc/proc-view?proc=auth::create_local_account&source_p=1&version_id=

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
http://www.openacs.org/api-doc/proc-view?proc=auth::UseEmailForLoginP&source_p=1&version_id=

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