Foros de discusión
Always getting the same userId in template
Juhi Kumari, modificado hace 11 años.
Always getting the same userId in template
Expert Mensajes: 347 Fecha de incorporación: 12/12/11 Mensajes recientes
Hi,
I want the loged-in user id in my web content template. For this in template I use
But it always return user id of Test Test only . Don't know where I am missing??
If any idea please share!!!!
Regards
Juhi
I want the loged-in user id in my web content template. For this in template I use
#set($userId = $getterUtil.getLong($request.get("theme-display").get("user-id")))
or
#set ($uId = $getterUtil.getLong($request.remote-user))
But it always return user id of Test Test only . Don't know where I am missing??
If any idea please share!!!!
Regards
Juhi
Jitendra Rajput, modificado hace 11 años.
RE: Always getting the same userId in template
Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
I guess UserId is default variable it should be directly available . No need to get it from request .
try to print $user_id
try to print $user_id
Juhi Kumari, modificado hace 11 años.
RE: Always getting the same userId in template
Expert Mensajes: 347 Fecha de incorporación: 12/12/11 Mensajes recientes
Hi Jitendra,
Thanks for your reply. But Its not working..
Regards
Juhi
Thanks for your reply. But Its not working..
Regards
Juhi
Jitendra Rajput, modificado hace 11 años.
RE: Always getting the same userId in template
Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
Did you tried by setting below property in portal-ext ?
journal.template.velocity.restricted.variables=
journal.template.velocity.restricted.variables=
Juhi Kumari, modificado hace 11 años.
RE: Always getting the same userId in template
Expert Mensajes: 347 Fecha de incorporación: 12/12/11 Mensajes recientes
Hi,
Already I did that one, then only I am getting same userId always.
Regards
Juhi
Already I did that one, then only I am getting same userId always.
Regards
Juhi
James Falkner, modificado hace 11 años.
RE: Always getting the same userId in template
Liferay Legend Mensajes: 1399 Fecha de incorporación: 17/09/10 Mensajes recientesJuhi Kumari:
Hi,
Already I did that one, then only I am getting same userId always.
Regards
Juhi
You need to uncheck the "Cacheable" option when editing the template.
Juhi Kumari, modificado hace 11 años.
RE: Always getting the same userId in template
Expert Mensajes: 347 Fecha de incorporación: 12/12/11 Mensajes recientes
Hi James,
Thanks for your reply. Now its working fine.
Regards
Juhi
Thanks for your reply. Now its working fine.
Regards
Juhi