Trigger afterSave for user Object is not run!

Hi guys, i have sample code
Moralis.Cloud.afterSave(“User”, async function(request) {‘affter save user’)

var user = Moralis.User.current();

user.setACL(new Moralis.ACL(user));
Above code is not run for user Object, now I change user Object to other, it’s run!
Why, thank for help

1 Like

From my tests I see the same behaviour, the afterSave for User isn’t triggered.

Ok, I hope Moralis Team will fix this problem

did anyone get this working?
afterSave trigger still not working for User class for me regardless of if I use:

Moralis.Cloud.afterSave("User", async (request) => {
    // code here


Moralis.Cloud.afterSave(Moralis.User, async (request) => {
    // code here

any help would be appreciated

it didn’t work last time I checked either, I think that it doesn’t work because afterSave for User class is used internally on Moralis server, you could try to use beforeSave for User Class instead of afterSave

1 Like

just tested both beforeSave and afterSave for User class. both are not working.
Devs please fix asap! thank you

can you paste the code that you used? beforeSave should work

This should work for you:

Moralis.Cloud.beforeSave('User', (request) => {"in before Save");

I basically did what you wrote but it doesn’t show up in my logs when I save or edit a users details.

Moralis.Cloud.beforeSave("User", (request) => {
  const logger = Moralis.Cloud.getLogger();"beforeSave done"); 

does it actually work for you crypto kid?

when I change the class to a class I created, the triggers work fine, just with the User class it doesn’t seem to trigger at all.

that code works for me
it also works this one for me:

Moralis.Cloud.beforeSave(Moralis.User, (request) => {"before save user");"before save user done");;

I was editing a username in Moralis dashboard when testing

ok il try get it working on my end. thanks