[opencms-dev] Deactivate a User in java-code

Achim Westermann achim.westermann at questico.de
Thu Jul 22 10:34:24 CEST 2010


  Hi Frank,

"public class CmsUser extends CmsPrincipal "!

So this should be nothing else from a readUser call (CmsObject),
user.setEnabled(true);
and
writeUser(user); (CmsObject)

HTH,

Achim


On 22.07.2010 10:18, Frank Pertack wrote:
> Hello,
>
> I have to write a class, in which a user can be deavtivated by a web-Interface.
>
> I found out the method "setDisabled()" in the CmsUser is deprecated. I shall use the CmsPrincipal instead.
> But somehow I am not able to instantiate a cmsPrincipal.
> Can anybody help me with a code-snippet, how I shall use the CmsPrincipal?
> - How can I load the User-Data with "readPrincipal(CmsObject cms, CmsUUID id)"?
> - Do I understand it right that the new method is "cmsPrincipal.setEnabled(false)" when I like to disable a user?
>
> Thank you in advance.
>
> Best regards
> Frank
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list