Skip to content

Commit

Permalink
Merge branch '2024.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Nov 13, 2024
2 parents a95397a + e6751b5 commit c933bfd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tine20/Calendar/js/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -764,12 +764,13 @@ Tine.Calendar.Model.Attender = Tine.Tinebase.data.Record.create([
*/
getUserId: function() {
var user_id = this.get('user_id');
if (! user_id) {
return null;
var user_type = this.get('user_type');

if (user_type == 'email') {
return this.get('user_email');
}

var userData = (typeof user_id.get == 'function') ? user_id.data : user_id;

var userData = (typeof user_id?.get == 'function') ? user_id.data : user_id;
if (!userData) {
return null;
}
Expand All @@ -778,7 +779,7 @@ Tine.Calendar.Model.Attender = Tine.Tinebase.data.Record.create([
return userData;
}

switch (this.get('user_type')) {
switch (user_type) {
case 'user':
case 'groupmember':
case 'memberOf':
Expand All @@ -796,9 +797,6 @@ Tine.Calendar.Model.Attender = Tine.Tinebase.data.Record.create([
return userData.list_id;
}
break;
case 'email':
return userData.user_email;
break;
default:
return userData.id
break;
Expand Down

0 comments on commit c933bfd

Please sign in to comment.