Making a Drush command
Drush provides an API that allows developers to write their own commands. These commands can be part of a module and loaded through a Drupal installation, or they can be placed in the local user's Drush folder for general purposes.
Often, contributed modules create commands to automate user interface operations. However, creating a custom Drush command can be useful for specific operations. In this recipe, we will create a command that loads all the users who have not logged in in the last 10 days and resets their password.
For this recipe, you need to have Drush installed. We will be creating a command in a local user directory.
How to do it…
- Create a file named
~/.drushfolder for ...