掲示板

passing the userid to a php portlet?

thumbnail
14年前 に William Shackelford によって更新されました。

passing the userid to a php portlet?

New Member 投稿: 18 参加年月日: 09/02/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
14年前 に Eric Devlin によって更新されました。

RE: passing the userid to a php portlet?

Regular Member 投稿: 154 参加年月日: 08/02/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
14年前 に William Shackelford によって更新されました。

RE: passing the userid to a php portlet?

New Member 投稿: 18 参加年月日: 09/02/26 最新の投稿
Thanks.. I didn't think about doing it via Javascript.. works great!
thumbnail
13年前 に Billy Jones によって更新されました。

RE: passing the userid to a php portlet?

New Member 投稿: 10 参加年月日: 10/08/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
13年前 に Gabriel Leon Leyva によって更新されました。

RE: passing the userid to a php portlet?

Regular Member 投稿: 243 参加年月日: 09/06/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
12年前 に Michael Charles によって更新されました。

RE: passing the userid to a php portlet?

New Member 投稿: 15 参加年月日: 11/01/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
12年前 に Gabriel Leon Leyva によって更新されました。

RE: passing the userid to a php portlet?

Regular Member 投稿: 243 参加年月日: 09/06/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();
10年前 に brian schneider によって更新されました。

RE: passing the userid to a php portlet?

New Member 投稿: 4 参加年月日: 13/07/29 最新の投稿
where can one find more information on quercus_servlet_request() or specifics about the request object it returns?
10年前 に brian schneider によって更新されました。

RE: passing the userid to a php portlet?

New Member 投稿: 4 参加年月日: 13/07/29 最新の投稿
more specifically, how do you access the browser get and post variables in your php portet?