mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-27 07:17:59 +01:00
15 lines
No EOL
448 B
PHP
15 lines
No EOL
448 B
PHP
<?php
|
|
use Illuminate\Auth\EloquentUserProvider;
|
|
use Illuminate\Auth\UserInterface;
|
|
|
|
class PFMAuth extends EloquentUserProvider {
|
|
|
|
function __construct() {
|
|
parent::__construct(new IpsHasher(), 'Entities\User');
|
|
}
|
|
|
|
public function validateCredentials(UserInterface $user, array $credentials) {
|
|
$plain = $credentials['password'];
|
|
return $this->hasher->check($plain, $user->getAuthPassword(), ['salt' => $user->password_salt]);
|
|
}
|
|
} |