Why beforeLogout and afterLogout have an empty runner context?

I have this code in the business logic:

@Override
public void beforeLogout( RunnerContext context ) throws Exception
{
  System.out.print(context.toString());


  String whereClause = "objectId" + " = '" + context.getUserId() + "'";
  BackendlessDataQuery query = new BackendlessDataQuery(whereClause);
  BackendlessCollection users = Backendless.Data.of((Class)BackendlessUser.class).find(query);
  if (users.getData().size() > 0) {
    BackendlessUser user = (BackendlessUser) users.getData().get(0);


    user.setProperty("currentDeviceId","");
    Backendless.UserService.update(user, new AsyncCallback<BackendlessUser>() {
      @Override
      public void handleResponse(BackendlessUser backendlessUser) {


      }


      @Override
      public void handleFault(BackendlessFault backendlessFault) {


      }
    });
  }
}

The runner context (toString) when beforeLogout/afterLogout are invoked:

RunnerContext{missingProperties=null,
 prematureResult=null,
 eventContext=null,
 AbstractContext{
appId='D058552D-B615-CA4C-FF72-XXXXXXXXXXX',
 userId='null',
 userToken='null',
 userRoles=[NotAuthenticatedUser],
 deviceType=ANDROID}}

How am I suppose to manage the user if the context does not contain any information regarding it?
This happens to both methods beforeLogout and afterLogout.

Hi Minitour,

We have created an internal task to investigate this issue. For reference, the task ID is BKNDLSS-12919.

I got the same problem. I expected that the context user was ServerCodeUser when saving data to some table/collection.

I tried on Backendless Standalone 3.0