function checkRegions(key, user) {
    app.regions.checkUser(user, execCommands);

    function execCommands(err) {
      if(err === false) {
        app.commands.execAll(user);
      } else {
        app.logger.error('Failed to check regions for user '+user.id );
      }
    }
  }
/**
   * On new/update user check regions
   * and commands.
   */
On new/update user check regions
and commands.
On new / update user check regions and commands .
function checkRegions(key, user) {
    app.regions.checkUser(user, execCommands);
    function execCommands(err) {
      if(err === false) {
        app.commands.execAll(user);
      } else {
        app.logger.error('Failed to check regions for user '+user.id );
      }
    }
  }
function checkRegions ( key , user ) { app . regions . checkUser ( user , execCommands ) ; function execCommands ( err ) { if ( err === false ) { app . commands . execAll ( user ) ; } else { app . logger . error ( 'Failed to check regions for user ' + user . id ) ; } } }
On new/update user check regions
 and commands.
On new / update user check regions and commands .