Forum OpenACS Development: Re: ad_proc [cc_email_user] returns blank

Collapse
Posted by Iuri Sampaio on
The same happens to [parameter::get]. I've just created a new parameter, which belongs to a new custom pkg.

Then, I try to get its info but it returns blank.

set token [parameter::get -parameter "WebAppAccessToken" -package_id 15689]

Noticing that parameter::get returns value to core existent params.

parameter::get -parameter "PortletTemplate" -package_id 4796
Returns: /packages/banners/templates/banners-portlet

I do remember that Gustaf mentioned some enhancements, in a previous forum thread, plus there's a new ad_proc to solve the problem. I'd need to look at api-doc its prototype.

Best wishes,

Collapse
Posted by Iuri Sampaio on
Here it goes

set token [parameter::get_global_value -package_key "evex-rest" -parameter "WebAppAccessToken"]

which brings global and instance contexts.

Would make sense an enhancement to parameter::get to have a new argument? (i.e. -scope "global/instance")

api-doc/proc-view?proc=parameter%3a%3aget&source_p=1

Collapse
Posted by Iuri Sampaio on
Bottom line, two subjects:

1. cc_email_user and party::get_by_email; and

2. parameter::get and parameter::get_global_value;

Best wishes,

Collapse
Posted by Gustaf Neumann on
Iuri,

1) you should replace deprecated calls by non-deprecated calls. Nobody will fix deprecated calls. OpenACS warns you, when you use deprecated calls.
2) parameter::get_global_value is not really new, it was introduced in 2010 [1]
-g

[1] http://cvs.openacs.org/browse/OpenACS/openacs-4/packages/acs-tcl/tcl/parameter-procs.tcl?r1=1.17&r2=1.17&u=3

Collapse
Posted by Iuri Sampaio on
Oops,
I knew about 2, but I didn't about 1! I should have looked at /api-doc in OpenACS.org, instead of my own box.

Thanks Gustaff

Collapse
Posted by Iuri Sampaio on
Even though, I found the reference to cc_email_user within /packages/acs-authentication/tcl/authentication-procs.tcl , line 216

...
set user_id [cc_lookup_email_user $email]
...

There's a core change that must be applied.

Best wishes

Collapse
Posted by Gustaf Neumann on
not sure what you mean: which change on the core do you think has to be applied to which version of the core to get which effect?