Skip to content

Instantly share code, notes, and snippets.

View MolloKhan's full-sized avatar

Diego Aguiar MolloKhan

View GitHub Profile
public function upload(): string
{
if (strtolower($_SERVER['REQUEST_METHOD']) !== 'post') {
return $this->render($this->showForm());
}
if (!array_key_exists('newPicture', $_FILES) || !array_key_exists('author', $_POST)) {
return $this->error400();
}
@MolloKhan
MolloKhan / FakeGenericResourceOwner.php
Created April 9, 2018 15:12
Fake HWIOauth resource owner
class FakeGenericResourceOwner extends GenericOAuth2ResourceOwner
{
/**
* Paths needed by UserResponse - which are used by our UserProvider
*/
protected $paths = array(
'identifier' => 'id',
'nickname' => 'login',
'realname' => 'name',
'email' => 'email',