I'm trying to return different results for respective google workspace users, the problem I'm facing is... the first answer is returning all users.
E.g. William Tell
and John Peter
gets the return of Mark Thomas
i.e. www.google.com
Expectation: I want to display the answer for respective users.
Where did I go wrong?
function getUserID() {
var user = Session.getActiveUser().getEmail();
var name = AdminDirectory.Users.get(user).name.fullName;
if (name ="Mark Thomas") {
greeting= "www.google.com";
} else if (name ="William Tell"){
greeting = "www.msn.com";
}
} else if (name ="John Peter"){
greeting = "www.yahoo.com";
}
return greeting;
}