留言板

passing the userid to a php portlet?

thumbnail
William Shackelford,修改在15 年前。

passing the userid to a php portlet?

New Member 帖子: 18 加入日期: 09-2-26 最近的帖子
I am developing a php portlet to extend the content on profile page for members of my liferay site. How do I pass the userid or screenname of the profile page users are on to php portlet from liferay?
thumbnail
Eric Devlin,修改在15 年前。

RE: passing the userid to a php portlet?

Regular Member 帖子: 154 加入日期: 08-2-19 最近的帖子
Hey,
Add a self posting page which which gets the userid from javascript. Here is a link that might help. Ignore the third step as that is for portletbridge, but the first two should do the trick.
Eric
thumbnail
William Shackelford,修改在15 年前。

RE: passing the userid to a php portlet?

New Member 帖子: 18 加入日期: 09-2-26 最近的帖子
Thanks.. I didn't think about doing it via Javascript.. works great!
thumbnail
Billy Jones,修改在13 年前。

RE: passing the userid to a php portlet?

New Member 帖子: 10 加入日期: 10-8-20 最近的帖子
Hi William,

I'm having the same problem trying to figure out how to obtain user id's is there any chance you can tell me more about how you did it?

thanks a lot!

Billy
thumbnail
Gabriel Leon Leyva,修改在13 年前。

RE: passing the userid to a php portlet?

Regular Member 帖子: 243 加入日期: 09-6-20 最近的帖子
import com.liferay.portal.util.PortalUtil;
import com.liferay.portal.model.User;
$util = new PortalUtil();
$user = $util->getUser($request->getRequest());
$UserID = $user->getuserId();
thumbnail
Michael Charles,修改在13 年前。

RE: passing the userid to a php portlet?

New Member 帖子: 15 加入日期: 11-1-20 最近的帖子
Gabriel Leon Leyva:
import com.liferay.portal.util.PortalUtil;
import com.liferay.portal.model.User;
$util = new PortalUtil();
$user = $util->getUser($request->getRequest());
$UserID = $user->getuserId();



Some have been asking about the "$request" variable. If you are struggling try.
$request = quercus_servlet_request();
thumbnail
Gabriel Leon Leyva,修改在12 年前。

RE: passing the userid to a php portlet?

Regular Member 帖子: 243 加入日期: 09-6-20 最近的帖子
thanks Michael

import com.liferay.portal.util.PortalUtil;
import com.liferay.portal.model.User;
$util = new PortalUtil();
$request = quercus_servlet_request();
$user = $util->getUser($request->getRequest());
$UserID = $user->getuserId();
brian schneider,修改在10 年前。

RE: passing the userid to a php portlet?

New Member 帖子: 4 加入日期: 13-7-29 最近的帖子
where can one find more information on quercus_servlet_request() or specifics about the request object it returns?
brian schneider,修改在10 年前。

RE: passing the userid to a php portlet?

New Member 帖子: 4 加入日期: 13-7-29 最近的帖子
more specifically, how do you access the browser get and post variables in your php portet?