Marking multiple account as Suspended account

When a user is marked as suspended from the UI, the backend updates the suspended_at and suspended_till fields in the user table. I have 500 users whose profiles need to be marked as suspended. I’m planning to retrieve these user IDs based on their group ID and set the suspended_at field to: current date
and the suspended_till field to:
‘Sun, 01 Aug 3024 02:30:00.000000000 UTC +00:00’

Can anyone suggest the best way to accomplish this?

I think you would need to do this either through the API or using the rails console.

Are you familiar with either of these options?

2 Likes

Yes i am planning to do this using rails console

1 Like

There’s some advice on this in Administrative Bulk Operations

1 Like

Figure out how to get the users and then use update_all.

I think ChatGPT can tell you pretty well

1 Like

Thank you so much everyone. I always find it pretty cool to see replies. Big love!