Hi,
If you send out an invite to a user to join the site CMS, they then loose their email - they cant login and their status is flagged as Invited. There is no way to resend an invite.
Is there a simple way to set their account to Active? The only way I found is to Disable the Account then Enable their account - the status goes to Active and then they can login.
At first I thought the only way I could get them access is to Delete their account and then add them back in but there isn't a visible way to Delete a User.
Umbraco won't let you fully delete users since this would affect things like the Audit Trail and previous versions. There's basically a lot of stuff foreign-keyed back to the users table. So if you deleted the user, all the related data would also have to be deleted, which would be a problem (imagine all the content created by that user suddenly disappearing!).
Having said that, for a newly created user who hasn't actually logged in (let alone managed any content) then you could probably just delete them directly from the umbracoUser table in the database. Not ideal, but it usually works (and SQL will scream at you if they can't be deleted because of constraints).
I think this probably raises another question, how can you re-invite a user or cancel an invitation. I've not used the invite approach yet (no requirement to so far) but it is an interesting question.
I'd recommend raising an issues like this on the Umbraco issue tracker - http://issues.umbraco.org/dashboard I imagine there are probably a lot of real-life scenarios that haven't been accounted for.
Umbraco already has the following functionality in his UserService
/// <summary>Deletes or disables a User</summary>
/// <param name="user"><see cref="T:Umbraco.Core.Models.Membership.IUser" /> to delete</param>
/// <param name="deletePermanently"><c>True</c> to permanently delete the user, <c>False</c> to disable the user</param>
void Delete(IUser user, bool deletePermanently);
"Deleting users are NOT supported as history needs to be kept. Please use the disable() method instead"
This method is no longer used in backoffice. This UserService method was invoked only in this deprecated code.
Only if you use the API UserService. But anyway I believe it will not work
How to delete a CMS user in 7.7.2
Hi, If you send out an invite to a user to join the site CMS, they then loose their email - they cant login and their status is flagged as Invited. There is no way to resend an invite.
Is there a simple way to set their account to Active? The only way I found is to Disable the Account then Enable their account - the status goes to Active and then they can login.
At first I thought the only way I could get them access is to Delete their account and then add them back in but there isn't a visible way to Delete a User.
Am I missing something?
Thanks
Jon
Umbraco won't let you fully delete users since this would affect things like the Audit Trail and previous versions. There's basically a lot of stuff foreign-keyed back to the users table. So if you deleted the user, all the related data would also have to be deleted, which would be a problem (imagine all the content created by that user suddenly disappearing!).
Having said that, for a newly created user who hasn't actually logged in (let alone managed any content) then you could probably just delete them directly from the umbracoUser table in the database. Not ideal, but it usually works (and SQL will scream at you if they can't be deleted because of constraints).
I think this probably raises another question, how can you re-invite a user or cancel an invitation. I've not used the invite approach yet (no requirement to so far) but it is an interesting question.
I'd recommend raising an issues like this on the Umbraco issue tracker - http://issues.umbraco.org/dashboard I imagine there are probably a lot of real-life scenarios that haven't been accounted for.
Umbraco already has the following functionality in his UserService
So it should be possible.
Kevain,
It is not possible anymore. In umbraco.business.logic.User (depreciated) the description itself already describes why it is no longer possible.
https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/umbraco.businesslogic/User.cs#L541
This method is no longer used in backoffice. This UserService method was invoked only in this deprecated code. Only if you use the API UserService. But anyway I believe it will not work
is working on a reply...