This commit is contained in:
a-sansara 2017-03-16 01:59:04 +01:00
parent de9c242c2f
commit ffd0addcec
2 changed files with 2 additions and 20 deletions

View File

@ -23,7 +23,7 @@ Or add the package to your `composer.json`.
``` ```
"require": { "require": {
"meta-tech/silex-core" : "~1.0" "meta-tech/silex-core" : "^1.0"
} }
``` ```

View File

@ -67,7 +67,7 @@ class UserProvider implements UserProviderInterface
} }
/*! /*!
* @method loadUserPrograms * @method loadUserByRole
* @public * @public
* @return Symfony\Component\Security\Core\User\User * @return Symfony\Component\Security\Core\User\User
*/ */
@ -76,24 +76,6 @@ class UserProvider implements UserProviderInterface
return $this->pdo->exec('SELECT * FROM ' . $this->table . ' WHERE roles LIKE :role', compact('role'))->fetchAll(); return $this->pdo->exec('SELECT * FROM ' . $this->table . ' WHERE roles LIKE :role', compact('role'))->fetchAll();
} }
/*!
* @method loadProgramKeys
* @public
* @return Symfony\Component\Security\Core\User\User
*/
public function loadProgramKeys()
{
$keys = [];
$rows = $this->loadUserPrograms();
$rows = array_merge($rows, $this->loadUserPrograms('INSURER'));
if (!empty($rows)) {
foreach ($rows as $row) {
$keys[] = $row->key;
}
}
return $keys;
}
/*! /*!
* @method loadUserByUsername * @method loadUserByUsername
* @public * @public