|
|
Index
| Recent Threads
| Who's Online
| User List
| Register
| Search
| Help
| |
Synyx created an OpenCms 7.0.4 Live CD, based on SLAX Linux, which is now available.
If you want to order a free CD copy, please write, including your postal address, to 
![]() |
OpenCms Forum » List all forums » Forum: Questions about Programming » Thread: Webuserlogin - Forgot his password - Reset password |
|
Thread Status: Normal Total posts in this thread: 4 |
[Add To My Favorites] [Watch this Thread] [Post new Thread] |
| Author |
|
|
Stranger
|
Hello, i have a webuser login section and now i need a way, to reset the password and send it to the users email. When i am not logged in, i can view all user details via CmsUser loadUser = cmsObject.readUser(paramUserName); But i cant do
because i get an exception
It makes sence, because a guest normally shouldnt be able to change does things, but now i need to do this. What is the right way to get this solved? thanks hanuchin |
||
|
|
Advanced Member Joined: May 7, 2004 Posts: 456 Status: Offline |
Hi, One possibility is to store a CmsObject with admin credentials and use this object for changing the password. You can get an admin CmsObject when you register a I_CmsModuleAction. You can store it using OpenCms.setRuntimeProperty(java.lang.Object key, java.lang.Object value) Flo ---------------------------------------- /** * Florian Hopf * Synyx GmbH & Co. KG */ |
||
|
|
Stranger
|
Hmm, i never did this. When i can store this object? |
||
|
|
Advanced Member Joined: May 7, 2004 Posts: 456 Status: Offline |
Hi, this is an example of a module action implementation. You create a class like this.
Afterwards, in your module, you register the classname with package structure in the module administration (Administration/Module Management/Choose your module/Edit Module) in the field Action Class (e.g. com.synyx.ModuleAction). Then you can access the CmsObject, which has Admin rights set, from anywhere inside of your application like this:
---------------------------------------- /** * Florian Hopf * Synyx GmbH & Co. KG */ ---------------------------------------- [Edit 1 times, last edit by Flo at Jan 22, 2010 7:01:41 PM] |
||
|
| [Show Printable Version of Thread] [Post new Thread] |