This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} | |