从liferay portlet访问用户?

编程入门 行业动态 更新时间:2024-10-25 17:30:00
本文介绍了从liferay portlet访问用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试为liferay开发一个portlet.

I'm attempting to develop a portlet for liferay.

如何获取当前登录用户的用户名和密码(以及liferay拥有的其他数据)?

How can I get access to the username and password (and other data liferay has) of the user that's currently logged in?

我还希望能够在用户更改密码时执行一些代码.

I'd also like to be able to execute some code when users change their password.

推荐答案

您可以通过调用PortletRequest对象中的html#getRemoteUser()"rel =" noreferrer> getRemoteUser() .这是由JSR-168定义的,因此它是跨门户兼容的.

You can get the User ID by calling getRemoteUser() in the PortletRequest object. This is defined by JSR-168 therefore it's cross-portal compatible.

获得ID后,您可以通过调用 getUserById() (Liferay特定服务).这是Portlet API规范未涵盖的内容,因此将您锁定在Liferay.

Once you have the ID you can fetch the additional informations by calling getUserById() (a Liferay specific service). This is something not covered by Portlet API specification, so it locks you to the Liferay.

更多推荐

从liferay portlet访问用户?

本文发布于:2023-10-07 17:37:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1470052.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:用户   liferay   portlet

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!