Avoid PHP notice when regenerating API token for a user

This commit is contained in:
Frederic Guillot
2017-05-12 17:35:22 -04:00
parent 873cd5aa94
commit eab2d872a8
2 changed files with 4 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ class UserApiAccessController extends BaseController
'api_access_token' => Token::getToken(),
));
$this->renderResponse();
$this->renderResponse($user);
}
public function remove()
@@ -45,10 +45,10 @@ class UserApiAccessController extends BaseController
'api_access_token' => null,
));
$this->renderResponse();
$this->renderResponse($user);
}
protected function renderResponse()
protected function renderResponse(array $user)
{
if ($this->request->isAjax()) {
$this->show();