Pony.fm/app/library/PFMAuth.php

15 lines
448 B
PHP
Raw Normal View History

2013-07-25 23:33:04 +02:00
<?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]);
}
}