Basically, in my app users can change their email addresses. The update code works just fine but it doesn’t reset the userStatus back to DISABLED. I would like them to have to validate their accounts again to prevent them from getting locked out if they screwed up the change to their email address.
static Future<bool> updateEmail(String email) async {
var user = await Backendless.userService.currentUser();
user.setProperty('email', email);
user.setProperty('userStatus', 'DISABLED');
return Backendless.userService.update(user).then((result) => true);
}
Thank you for using Backendless.
That is true that update for users doesn’t change status.
For changing user status you should use next methods from Backendless.userService:
Hi @Carlton_Branch!
I am sorry but it looks like I misguided you. I though that you are using JS SDK. This methods available only in JS SDK and only with CloudCode (BL) API Key. There also REST route present but it also works only with CloudCode (BL) API Key. We do not allow status change from client apps for security reasons.
So you need to create a custom BL service and call it any time when you need to change user status.