This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal
Saturday 17 July 2010 9:02:37 pm - 1 reply
Hello,
I'm currently working on an extension for paying registration into eZPublish. To build this, i'm using 2 workflow/triggers :
I'm having a problem in checkout > after : using eZUser::currentUser() always returns anonymous user.
I tryed to watch the $process parameter of the execute() method my workflow : user id passed in the object is 10 too (anonymous user); so i cannot find a way to get my current user.
If i disable the payment workflow/trigger, i can get my user normally using eZUser::currentUser().
Am i doing something wrong ?
Regards,
Stéphane.
PS : I'm using eZPublish 4.3
Modified on Saturday 17 July 2010 10:59:21 pm by Stéphane Le Merre
Sunday 18 July 2010 1:05:58 am
I found out how to solve this, the checkout->after workflow is call by the bank script with no session in it, that's why eZUser::currentUser() returns anonymous. Quiet stupid question but i'm tired
Maybe solution can help, so i get the user from the order_id :
function execute( $process, $event ) { $bResult = false; $s = new PremiumSubscription(); $processParams = $process->attribute( 'parameter_list' ); $orderID = $processParams['order_id']; $order = eZOrder::fetch( $orderID ); $currentUser = $order->user(); $userId = $currentUser->id(); //... }
Regards,
Stéphane.
You must be logged in to post messages in this topic!