Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fawno/drupalpasswordhasher
DrupalPasswordHasher for CakePHP
https://github.com/fawno/drupalpasswordhasher
cakephp php
Last synced: about 1 month ago
JSON representation
DrupalPasswordHasher for CakePHP
- Host: GitHub
- URL: https://github.com/fawno/drupalpasswordhasher
- Owner: fawno
- License: mit
- Created: 2018-10-11T19:13:41.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-18T04:54:53.000Z (almost 6 years ago)
- Last Synced: 2024-10-13T23:42:55.868Z (about 1 month ago)
- Topics: cakephp, php
- Language: PHP
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![](https://img.shields.io/github/license/fawno/DrupalPasswordHasher.svg?style=plastic)](https://github.com/fawno/DrupalPasswordHasher/blob/master/LICENSE)
# DrupalPasswordHasher
DrupalPasswordHasher for CakePHP 3.x## Install
```bash
composer require fawno/drupal-password-hasher
```## Config AppController.php
```php
use Fawno\Auth\DrupalPasswordHasher;$this->loadComponent('Auth', [
'authenticate' => [
'Form' => [
'passwordHasher' => DrupalPasswordHasher::class,
'fields' => [
'username' => 'username',
'password' => 'password',
]
]
],
]);
```
## Config Model/Entity/User.php
```php
use Fawno\Auth\DrupalPasswordHasher;class User extends Entity {
protected function _setPassword ($value) {
if (strlen($value)) {
$hasher = new DrupalPasswordHasher();return $hasher->hash($value);
}
}
}
```