I have some difficulty searching and creating a script. What I am trying to achieve is getting the user's email/name when they edited a cell in my spreadsheet. I tried getactiveuser but its not showing anything. I read that some ask to use geteffectiveuser but all I get is still my username back and not the other editor.
Here is my script so far:
function onEdit() {
  var s = SpreadsheetApp.getActiveSheet();
  if( s.getName() == "TEST" ) { //checks that we're on the correct sheet
    var r = s.getActiveCell();
    var email = Session.getActiveUser().getEmail();
    if( r.getColumn() == 4 ) { //checks the column for HUB side
      var nextCell = r.offset(0, 1);
      if( nextCell.getValue() === '' ) //is empty?
        nextCell.setValue(email());
    }
  }
}
Logger.log(Session.getActiveUser().getEmail());
As of the above, nothing is showing up.