Pony.fm/app/library/PFMAuth.php
2013-08-01 12:35:38 -05:00

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]);
}
}