MyController::reset_api_key PHP Method

reset_api_key() public method

public reset_api_key ( )
    public function reset_api_key()
    {
        //TODO: POST check
        $this->User->ApiToken->destroy($this->current_user['id'], 'api');
        $this->Session->setFlash(__('Your API access key was reset.'), 'default', array('class' => 'flash flash_notice'));
        $this->redirect('account');
    }