If the other site uses Phpass (Portable PHP password) password hashes, which are used from Drupal and from Joomla (starting with versions 2.5.18 and 3.2.1), then it's possible to migrate passwords. Drupal is able to handle Phpass password hashes that start with $P$, which are MD5 hashes normally used by phpBB3, that start with $H$, still MD5 hashes, that start with U$, which are Drupal 6 password hashes updated by user_update_7000()
, and that start with $S$, the usual SHA512 password hashes Drupal 7 uses.
For other password hashes, a module should create a service that implements PasswordInterface
and that verifies the password entered from the user matches the password hash stored in the database in PasswordInterface::check()
.
As reference, the default code used by Drupal core is in the PhpassHashedPassword
class.