Comments (3)
Warning:
We strongly do advise against using .destroy_all
This potentially briggs your system and ecnourage you to use the above linked commands to delete one or more users. Our suggested script also provides the things it's going to delete.
Also you don't need to reindex your Searchindex, as this should be triggered by Zammad automatically.
Thanks for your time and effort. For the next time, please don't hijack old closed issues, as this is a bit troublesome for the overview :) If you have enhancements for the documentation, pull requests are very welcome!
from zammad-documentation.
The rework of the console documentation is now finished.
While I was at it, I added information on how to destroy users.
from zammad-documentation.
So I just figured out a way to delete objects such as users or tickets from the database.
Let's say you want to delete a user with the email: [email protected]
, to delete the user, follow this:
- Open your console:
RAILS_ENV=production rails console
- Search for the user:
user = User.where(email: "[email protected]")
This will display all the information about the user. - Delete the user and all related information:
user.destroy_all
- Exit the rails console:
exit
- Reindex Elasticsearch:
RAILS_ENV=production rails searchindex:rebuild
That's all.
I hope it helps.
from zammad-documentation.
Related Issues (20)
- Add CentOS 7 as additional deprecated distro in note HOT 1
- Rails command for translation of custom objects doesn't work HOT 1
- API Documentation - PUT request instead of POST request to create a shared draft
- Remove custom state configuration via rails
- Remove priority handling via rails console
- Raise minimum supporte Safari version to 14 / 14.1
- Ruby version updated
- Node version update (18.0+ => 18.10+)
- Cleanup of info/hint/warning containers
- Remove MacOS installation instructions HOT 2
- Set required ruby version to 3.2.3 for Zammad 6.3
- Rework Backup & Restore section (Appendix)
- Rework "Troubleshooting & FAQ" (appendix)
- Check if reporting with futher tools can be documented
- Add note for IPv6 only setups and packager.io
- Add "hint" on how to change ticket group via API when working with sub-groups
- Change ruby version in 'Install from source' section or replace it by placeholder
- API - Add the import endpoint for Organization and User. HOT 1
- Add link to translation chapter as an alternative to the Rails command HOT 8
- Document handling of failed mails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zammad-documentation.