<?php
namespace App\Entity;
use App\Filter\UserFilter;
use App\Service\EsEncrypt;
use App\Filter\UserNameFilter;
use App\Filter\UserAdminFilter;
use App\Annotation\EsUploadable;
use Doctrine\ORM\Mapping as ORM;
use App\Annotation\EsElasticIndex;
use App\Controller\UserController;
use App\Repository\UserRepository;
use ApiPlatform\Core\Annotation\ApiFilter;
use App\Entity\Traits\TimestampableEntity;
use Doctrine\ORM\Mapping\UniqueConstraint;
use Doctrine\Common\Collections\Collection;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Validator\Constraints as CustomAssert;
use ApiPlatform\Core\Annotation\ApiSubresource;
use App\Entity\Interfaces\ClientMappedInterface;
use App\Entity\Interfaces\UploadMappedInterface;
use Doctrine\Common\Collections\ArrayCollection;
use App\Entity\Interfaces\ElasticMappedInterface;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Annotation\MaxDepth;
use App\Entity\Interfaces\OperationLogMappedInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Security\Core\User\UserInterface;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\DateFilter;
use Symfony\Component\Serializer\Annotation\SerializedName;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\OrderFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\BooleanFilter;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Hslavich\OneloginSamlBundle\Security\User\SamlUserInterface;
use Locastic\ApiPlatformTranslationBundle\Model\AbstractTranslatable;
use Locastic\ApiPlatformTranslationBundle\Model\TranslationInterface;
use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
/**
* @ApiResource(
* attributes={"filters"={"translation.groups"}},
* normalizationContext={"groups"={"User:Read"}, "skip_null_values"=false, "enable_max_depth"=true},
* denormalizationContext={"groups"={"User:Write", "UserTranslationGroup"}},
* collectionOperations={
* "post"={"security"="is_granted('ROLE_OPERATOR') || is_granted('ROLE_SUPPORT')"},
* "get"={"security"="is_granted('ROLE_OPERATOR') || is_granted('ROLE_SUPPORT')"},
* "get_admin_list"={
* "path"="/users/get-admin-list",
* "method"="GET",
* "normalization_context"={"groups"={"User:Get-Admin-List"}, "skip_null_values"=false},
* "security"="is_granted('ROLE_OPERATOR') || is_granted('ROLE_SUPPORT')"
* },
* "get_admin"={
* "path"="/users/get-admin",
* "method"="GET",
* "normalization_context"={"groups"={"User:Get-Admin","User:Get-Admin-List"}, "skip_null_values"=false},
* "security"="is_granted('ROLE_OPERATOR') || is_granted('ROLE_SUPPORT')"
* },
* "get_limited"={
* "path"="/users/get-limited",
* "method"="GET",
* "normalization_context"={"groups"={"User:Get-Limited"}, "skip_null_values"=false},
* "security"="is_granted('IS_AUTHENTICATED_FULLY')"
* },
* "get_me"={
* "route_name"="api_users_me_collection",
* "method"="GET",
* "normalization_context"={"groups"={"User:Me"}, "skip_null_values"=false},
* "security"="is_granted('PUBLIC_ACCESS')"
* },
* "get_me_subscribed"={
* "route_name"="api_users_me_subscribed_collection",
* "method"="GET",
* "normalization_context"={"groups"={"User:Me", "User:Me-Subscribed"}, "skip_null_values"=false, "enable_max_depth"=true},
* "security"="is_granted('PUBLIC_ACCESS')"
* },
* "get_attendee_list"={
* "path"="/users/attendee-list",
* "method"="GET",
* "normalization_context"={"groups"={"User:Attendee-List"}, "skip_null_values"=false},
* "security"="is_granted('IS_AUTHENTICATED_FULLY')",
* "pagination_client_partial"=true
* },
* "get_attendee_list_o"={
* "path"="/users/attendee-list-o",
* "method"="GET",
* "normalization_context"={"groups"={"User:Attendee-List-O"}, "skip_null_values"=false},
* "security"="is_granted('IS_AUTHENTICATED_FULLY')",
* "pagination_client_partial"=true
* },
* "get_for_assign"={
* "path"="/users/get-for-assign",
* "method"="GET",
* "normalization_context"={"groups"={"User:Attendee-List"}, "skip_null_values"=false},
* "security"="is_granted('IS_AUTHENTICATED_FULLY')"
* },
* "get_for_assign_with_group"={
* "path"="/users/get-for-assign-with-group",
* "method"="GET",
* "normalization_context"={"groups"={"User:Assign-List"}, "skip_null_values"=false},
* "security"="is_granted('IS_AUTHENTICATED_FULLY')"
* },
* "post_email_exist"={
* "route_name"="api_users_email_exist_collection",
* "method"="POST",
* "denormalization_context"={"groups"={"User:Email-Exist"}, "skip_null_values"=false}
* },
* "post_invite_code"={
* "route_name"="api_users_invite_code_collection",
* "method"="POST",
* "denormalization_context"={"groups"={"User:Invite-Code"}, "skip_null_values"=false}
* },
* "post_ug_attach"={
* "route_name"="api_users_ug_attach_collection",
* "method"="POST",
* "denormalization_context"={"groups"={"User:Ug-Attach"}, "skip_null_values"=false}
* },
* "post_user_exist"={
* "route_name"="api_users_user_exist_collection",
* "method"="POST",
* "denormalization_context"={"groups"={"User:Email-Exist"}, "skip_null_values"=false},
* "security"="is_granted('ROLE_OPERATOR') || is_granted('ROLE_SUPPORT')"
* },
* "post_user_attach"={
* "route_name"="api_users_user_attach_collection",
* "method"="POST",
* "denormalization_context"={"groups"={"User:Email-Exist"}, "skip_null_values"=false},
* "security"="is_granted('ROLE_OPERATOR') || is_granted('ROLE_SUPPORT')"
* },
* "post_feed_subscribe"={
* "route_name"="api_users_feed_subscribe_collection",
* "method"="POST",
* "denormalization_context"={"groups"={"User:Feed-Subscribe"}, "skip_null_values"=false},
* "security"="is_granted('IS_AUTHENTICATED_FULLY')",
* "output_formats"={"json"={"application/ld+json", "application/json"}}
* },
* "post_feed_subscribe_category"={
* "route_name"="api_users_feed_subscribe_category_collection",
* "method"="POST",
* "denormalization_context"={"groups"={"User:Feed-Subscribe"}, "skip_null_values"=false},
* "security"="is_granted('IS_AUTHENTICATED_FULLY')",
* "output_formats"={"json"={"application/ld+json", "application/json"}}
* },
* "post_container_feed_subscribe"={
* "route_name"="api_users_container_feed_subscribe_collection",
* "method"="POST",
* "denormalization_context"={"groups"={"User:Container-Feed-Subscribe"}, "skip_null_values"=false},
* "security"="is_granted('IS_AUTHENTICATED_FULLY')",
* "output_formats"={"json"={"application/ld+json", "application/json"}}
* },
* "post_container_feed_send"={
* "route_name"="api_users_container_feed_send_collection",
* "method"="POST",
* "denormalization_context"={"groups"={"User:Container-Feed-Send"}, "skip_null_values"=false},
* "security"="is_granted('ROLE_ADMIN')",
* "output_formats"={"json"={"application/ld+json", "application/json"}}
* },
* "post_global_create"={
* "route_name"="api_users_global_create_collection",
* "method"="POST",
* "denormalization_context"={"groups"={"User:Global-Create"}, "skip_null_values"=false},
* "security"="is_granted('ROLE_SUPER_ADMIN')",
* "output_formats"={"json"={"application/ld+json", "application/json"}}
* },
* "post_global_delete"={
* "route_name"="api_users_global_delete_collection",
* "method"="POST",
* "denormalization_context"={"groups"={"User:Global-Delete"}, "skip_null_values"=false},
* "security"="is_granted('ROLE_SUPER_ADMIN')",
* "output_formats"={"json"={"application/ld+json", "application/json"}}
* },
* "get_for_public_page"={
* "route_name"="api_pub_users_get_for_public_page_collection",
* "method"="GET",
* "security"="is_granted('PUBLIC_ACCESS')",
* "normalization_context"={"groups"={"User:PRead"}, "skip_null_values"=false},
* "pagination_enabled"=true
* },
* "get_for_select_public_page"={
* "route_name"="api_pub_users_get_for_select_public_page_collection",
* "method"="GET",
* "security"="is_granted('PUBLIC_ACCESS')",
* "normalization_context"={"groups"={"User:PSRead"}, "skip_null_values"=false},
* "pagination_enabled"=true
* },
* },
* itemOperations={
* "get"={
* "normalization_context"={"groups"={"User:Read", "User:Get-Item"}, "skip_null_values"=false},
* "security"="is_granted('ROLE_OPERATOR') || is_granted('ROLE_SUPPORT') || object == user"
* },
* "get_open"={
* "normalization_context"={"groups"={"User:Get-Open"}, "skip_null_values"=false},
* "path"="/users/{id}/open",
* "method"="GET",
* "security"="is_granted('IS_AUTHENTICATED_FULLY')"
* },
* "get_open_wr"={
* "normalization_context"={"groups"={"User:Read", "User:Get-RoleContainer"}, "skip_null_values"=false},
* "path"="/users/{id}/open-wr",
* "method"="GET",
* "security"="is_granted('ROLE_OPERATOR') || is_granted('ROLE_SUPPORT')"
* },
* "get_attendee_view"={
* "normalization_context"={"groups"={"User:Read", "User:Get-Item"}, "skip_null_values"=false},
* "path"="/users/{id}/attendee-view",
* "method"="GET",
* "security"="is_granted('IS_AUTHENTICATED_FULLY')"
* },
* "get_for_public_item_page"={
* "route_name"="api_pub_users_get_for_public_page_item",
* "method"="GET",
* "security"="is_granted('PUBLIC_ACCESS')",
* "normalization_context"={"groups"={"User:PRead"}, "skip_null_values"=false}
* },
* "put"={"security"="is_granted('ROLE_OPERATOR') || is_granted('ROLE_SUPPORT')"},
* "put_change_profile"={
* "route_name"="api_users_change_profile_item",
* "method"="PUT",
* "security"="is_granted('IS_CLIENT_OWNER', object) && object == user",
* "denormalization_context"={"groups"={"User:Change-Profile"}},
* "validation_groups"={"User:Strong-Password"}
* },
* "patch"={"security"="is_granted('ROLE_OPERATOR') || is_granted('ROLE_SUPPORT')"},
* "patch_change_email"={
* "route_name"="api_users_change_email_item",
* "method"="PATCH",
* "security"="is_granted('IS_CLIENT_OWNER', object) && object == user",
* "denormalization_context"={"groups"={"User:Change-Email"}}
* },
* "patch_change_password"={
* "route_name"="api_users_change_password_item",
* "method"="PATCH",
* "security"="is_granted('IS_CLIENT_OWNER', object) && object == user",
* "denormalization_context"={"groups"={"User:Change-Password"}},
* "validation_groups"={"User:Change-Password", "User:Strong-Password"}
* },
* "patch_follow_unfollow"={
* "route_name"="api_users_follow_unfollow_item",
* "method"="PATCH",
* "security"="is_granted('IS_CLIENT_OWNER', object) && object == user",
* "denormalization_context"={"groups"={"User:Follow-Unfollow"}},
* "output"=false
* },
* "patch_follow_unfollow_company"={
* "route_name"="api_users_follow_unfollow_company_item",
* "method"="PATCH",
* "security"="is_granted('IS_CLIENT_OWNER', object) && object == user",
* "denormalization_context"={"groups"={"User:Follow-Unfollow-Company"}},
* "output"=false
* },
* "patch_notification_company"={
* "route_name"="api_users_follow_notification_company_item",
* "method"="PATCH",
* "security"="is_granted('IS_CLIENT_OWNER', object) && object == user",
* "denormalization_context"={"groups"={"User:Notification-Company"}},
* "output"=false
* },
* "patch_reset_password"={
* "route_name"="api_users_reset_password_item",
* "method"="PATCH",
* "security"="is_granted('IS_CLIENT_OWNER', object) && (is_granted('ROLE_OPERATOR') || is_granted('ROLE_SUPPORT'))",
* "denormalization_context"={"groups"={"User:Reset-Password"}}
* },
* "patch_change_login_onboarding"={
* "route_name"="api_users_change_login_onboarding_item",
* "method"="PATCH",
* "security"="is_granted('IS_CLIENT_OWNER', object) && object == user",
* "denormalization_context"={"groups"={"User:Change-Login-Onboarding"}},
* "validation_groups"={"User:Strong-Password"}
* },
* "patch_unsubscribe"={
* "route_name"="api_users_unsubscribe_item",
* "method"="PATCH",
* "security"="is_granted('ROLE_OPERATOR') || is_granted('ROLE_SUPPORT')"
* },
* "patch_change_role"={
* "route_name"="api_users_change_role_item",
* "method"="PATCH",
* "security"="is_granted('ROLE_OPERATOR', object) || is_granted('ROLE_SUPPORT', object)",
* "denormalization_context"={"groups"={"User:Change-Role"}}
* },
* "delete_delete"={
* "route_name"="api_users_delete_item",
* "method"="DELETE",
* "security"="is_granted('ROLE_OPERATOR', object) || is_granted('ROLE_SUPPORT', object) || object == user"
* }
* }
* )
* @ApiFilter(SearchFilter::class, properties={"id": "exact", "client.id": "exact", "userContainer.id": "exact", "status": "exact", "email": "partial", "firstName": "partial", "lastName": "partial","company": "partial","jobTitle": "partial","roleContainers.role": "exact","roleContainers.container.id": "exact","relationManager.id": "exact","userGroups.id": "exact","userTags.id": "exact","source": "exact", "followers.id": "exact", "following.id": "exact", "glnNumber": "exact", "registeredToConferences.id", "exact", "country": "exact", "userAcademicTitles.academicTitle.id": "exact", "specialTitles.id": "exact", "categories.id": "exact", "userCreditPoints.creditCategory.id": "exact", "organization.id": "exact"})
* @ApiFilter(BooleanFilter::class, properties={"isExposeEmail", "isAllowCommunication", "isDisplayAsGuest", "isOnboarded", "isBlocked", "isUnsubscribedInvite", "isEmailOff"})
* @ApiFilter(DateFilter::class, properties={"onboardedAt", "createdAt", "lastLoginAt"})
* @ApiFilter(UserFilter::class, properties={"search": "partial"})
* @ApiFilter(UserNameFilter::class, properties={"search": "partial"})
* @ApiFilter(UserAdminFilter::class, properties={"search": "partial"})
* @ApiFilter(OrderFilter::class, properties={"id", "firstName": "ASC", "lastName", "email", "status", "company", "jobTitle"})
* @ORM\Entity(repositoryClass=UserRepository::class)
* @UniqueEntity(fields={"email", "client"}, message="validation.user:email.alreadyExist")
* @ORM\Table(
* name="user",
* indexes={
* @ORM\Index(name="user_email_idx", columns={"email"}),
* @ORM\Index(name="is_onboarded_idx", columns={"is_onboarded"}),
* @ORM\Index(name="is_display_as_guest_idx", columns={"is_display_as_guest"}),
* @ORM\Index(name="last_name_idx", columns={"last_name"})
* },
* uniqueConstraints={@UniqueConstraint(name="user_unique", columns={"email", "client_id"})}
* )
* @EsElasticIndex("User:EL")
*/
class User extends AbstractTranslatable implements UserInterface, PasswordAuthenticatedUserInterface, SamlUserInterface, ClientMappedInterface, UploadMappedInterface, OperationLogMappedInterface, ElasticMappedInterface
{
/**
* Hook timestampable behavior
* updates createdAt, updatedAt fields
*/
use TimestampableEntity;
/**
* @ORM\OneToMany(targetEntity="UserTranslation", mappedBy="translatable", fetch="EXTRA_LAZY", indexBy="locale", cascade={"PERSIST"}, orphanRemoval=true)
*
* @Groups({"User:Write", "User:Change-Profile", "UserTranslationGroup"})
* @Assert\Valid()
*/
protected $translations;
/**
* @Groups({"User:Get-Item"})
*/
private $biography;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"User:EL", "Conference:EL", "Session:EL", "VideoGallery:EL", "ElCourse:EL", "ElTask:EL", "Newsfeed:EL", "DocFile:EL", "User:Exp", "User:Read","User:Get-Admin","User:Get-Admin-List","User:Write","User:Me", "User:Attendee-List", "User:Attendee-List-O", "User:Get-Limited","Session:Select","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "WatchTime:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SessionComment:Read", "Session:Read", "Company:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatThread:Read", "ChatMessage:Read", "Session:VideoLibrary", "VoteResult:Read", "SessionQuestion:Read", "Meeting:Read", "MeetingBooking:Read", "Import:Read", "VoucherCode:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read", "ElCourseJoin:Read", "ElTaskAttempt:Read", "ElExamAttempt:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "SurveyResult:Read", "User:PRead", "User:PSRead", "Certificate:Read", "ElLession:Detail", "User:Assign-List", "ElCourseRating:Read", "User:Get-Open"})
*/
private $id;
/**
* @ORM\Column(type="estring", length=255)
* @Groups({"User:Exp", "User:Imp", "User:Read","User:Get-Admin","User:Get-Admin-List","User:Write","User:Me", "User:Change-Email", "User:Attendee-List", "User:Get-Limited","Session:Select", "VideoGalleryHistory:Read", "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "WatchTime:Read", "User:Email-Exist", "VoteResult:Read", "VoteResult:Exp", "Import:Read", "SessionQuestion:Exp", "VoucherCode:Read", "VoucherCode:Exp", "ElExamAttempt:Read", "ElExamAnswer:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SurveyResult:Read", "User:Invite-Code", "User:Ug-Attach", "User:Global-Create", "User:Global-Delete"})
* @Assert\NotBlank(message="validation.user:email.notBlank")
* @Assert\Email(message="validation.user:email.email", mode="loose")
* @Assert\Length(max=255, maxMessage="validation.user:email.max")
* @CustomAssert\IsUserEmailDomainValid()
*/
private $email;
/**
* @var string The hashed password
* @ORM\Column(type="string", nullable=true)
*/
private $password;
/**
* @Groups({"User:Exp", "User:Imp", "User:Write", "User:Change-Profile", "User:Change-Password", "User:Reset-Password", "User:Change-Login-Onboarding", "User:Global-Create"})
* @CustomAssert\StrongPasswordStrength(groups={"User:Strong-Password"})
*/
private $plainPassword;
/**
* @UserPassword(message="validation.user:oldPassword.incorrect", groups={"User:Change-Password"})
* @Groups({"User:Change-Password"})
*/
private $oldPassword;
/**
* @ORM\Column(type="estring", length=255, nullable=true)
* @Groups({"User:EL", "User:Exp", "User:Imp", "User:Read","User:Get-Admin","User:Get-Admin-List","User:Write","User:Me", "User:Attendee-List", "User:Attendee-List-O", "User:Change-Profile", "User:Get-Limited","Session:Select","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "WatchTime:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SessionComment:Read", "Session:Read", "Company:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatThread:Read", "ChatMessage:Read", "Session:VideoLibrary", "VoteResult:Read", "VoteResult:Exp", "SessionQuestion:Read", "Meeting:Read", "MeetingBooking:Read", "Import:Read", "SessionQuestion:Exp", "VoucherCode:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read", "ElCourseJoin:Read", "ElTaskAttempt:Read", "ElExamAttempt:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "SurveyResult:Read", "User:PRead", "User:PSRead", "Certificate:Read", "ElLession:Detail", "User:Assign-List", "ElCourseRating:Read", "User:Global-Create", "User:Get-Open"})
* @Assert\Length(max=255, maxMessage="validation.user:firstName.max")
*/
private $firstName;
/**
* @ORM\Column(type="estring", length=255, nullable=true)
* @Groups({"User:EL", "User:Exp", "User:Imp", "User:Read","User:Get-Admin","User:Get-Admin-List","User:Write","User:Me", "User:Attendee-List", "User:Attendee-List-O", "User:Change-Profile", "User:Get-Limited","Session:Select","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "WatchTime:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SessionComment:Read", "Session:Read", "Company:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatThread:Read", "ChatMessage:Read", "Session:VideoLibrary", "VoteResult:Read", "VoteResult:Exp", "SessionQuestion:Read", "Meeting:Read", "MeetingBooking:Read", "Import:Read", "SessionQuestion:Exp", "VoucherCode:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read", "ElCourseJoin:Read", "ElTaskAttempt:Read", "ElExamAttempt:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "SurveyResult:Read", "User:PRead", "User:PSRead", "Certificate:Read", "ElLession:Detail", "User:Assign-List", "ElCourseRating:Read", "User:Global-Create", "User:Get-Open"})
* @Assert\Length(max=255, maxMessage="validation.user:lastName.max")
*/
private $lastName;
/**
* @ORM\Column(type="string", length=16, nullable=true)
* @Groups({"User:Exp", "User:Imp", "User:Read","User:Write","User:Me", "User:Attendee-List", "User:Change-Profile", "User:Change-Login-Onboarding"})
* @Assert\Length(max=16, maxMessage="validation.user:locale.max")
*/
private $locale;
/**
* @ORM\ManyToOne(targetEntity=Client::class)
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
* @Groups({"User:Read","User:Me","User:PRead"})
*/
private $client;
/**
* @ORM\Column(type="string", length=32)
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="string",
* "enum"={self::STATUS_ACTIVE, self::STATUS_INACTIVE}
* }
* }
* )
* @Groups({"User:Exp", "User:Read","User:Write","User:Me"})
* @Assert\Choice({self::STATUS_ACTIVE, self::STATUS_INACTIVE})
*/
private $status;
public const STATUS_ACTIVE = 'ACTIVE';
public const STATUS_INACTIVE = 'INACTIVE';
/**
* @ORM\Column(type="estring", length=255, nullable=true)
* @Groups({"User:EL", "User:Exp", "User:Imp", "User:Read","User:Get-Admin","User:Get-Admin-List","User:Write","User:Me", "User:Attendee-List", "User:Change-Profile", "User:Get-Limited","Session:Select","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "WatchTime:Read", "Session:Read", "Company:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatThread:Read", "Session:VideoLibrary", "Meeting:Read", "MeetingBooking:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "User:PRead", "User:Assign-List"})
* @Assert\Length(max=255, maxMessage="validation.user:company.max")
*/
private $company;
/**
* @ORM\Column(type="estring", length=255, nullable=true)
* @Groups({"User:EL", "User:Exp", "User:Imp", "User:Read","User:Get-Admin","User:Get-Admin-List","User:Write","User:Me", "User:Attendee-List", "User:Change-Profile", "User:Get-Limited","Session:Select","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "WatchTime:Read", "Session:Read", "Company:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatThread:Read", "Session:VideoLibrary", "Meeting:Read", "MeetingBooking:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "User:PRead", "User:Assign-List"})
* @Assert\Length(max=255, maxMessage="validation.user:jobTitle.max")
*/
private $jobTitle;
/**
* @ORM\ManyToMany(targetEntity=Role::class)
*/
private $roles;
/**
* @ORM\OneToMany(targetEntity=RoleContainer::class, mappedBy="user", cascade={"persist"}, orphanRemoval=true)
* @Groups({"User:Get-RoleContainer"})
*/
private $roleContainers;
/**
* @ORM\ManyToMany(targetEntity=UserGroup::class, inversedBy="users")
* @Groups({"User:Exp", "User:Imp", "User:Read","User:Write","User:Me", "User:Ug-Attach"})
*/
private $userGroups;
/**
* @ORM\ManyToMany(targetEntity=UserTag::class, mappedBy="users", cascade={"persist"})
* @Groups({"User:Exp", "User:Read","User:Write", "User:Me", "User:Attendee-List", "User:Change-Profile"})
*/
private $userTags;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"User:Exp", "User:Imp","User:EL", "Conference:EL", "Session:EL", "VideoGallery:EL", "ElCourse:EL", "ElTask:EL", "Newsfeed:EL", "DocFile:EL", "User:Read","User:Get-Admin","User:Get-Admin-List","User:Write", "User:Me", "User:Attendee-List", "User:Attendee-List-O", "User:Change-Profile", "User:Get-Limited","Session:Select","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "WatchTime:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SessionComment:Read", "Session:Read", "Company:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatThread:Read", "ChatMessage:Read", "Session:VideoLibrary", "VoteResult:Read", "SessionQuestion:Read", "Meeting:Read", "MeetingBooking:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read", "ElCourseJoin:Read", "ElTaskAttempt:Read", "ElExamAttempt:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "SurveyResult:Read", "User:PRead", "User:PSRead", "Certificate:Read", "ElLession:Detail", "User:Assign-List", "ElCourseRating:Read", "User:Get-Open"})
* @Assert\Length(max=255, maxMessage="validation.user:imageName.max")
* @EsUploadable()
*/
protected $imageName;
/**
* @Groups({"User:Exp", "User:Imp"})
*/
protected $imageUrl;
/**
* @ORM\Column(type="string", length=16)
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="string",
* "enum"={self::SOURCE_CREATE, self::SOURCE_INVITE, self::SOURCE_IMPORT, self::SOURCE_REGISTER, self::SOURCE_SOCIAL, self::SOURCE_ANONYMOUS_READER, self::SOURCE_INVITE_EXTERNAL}
* }
* }
* )
* @Groups({"User:Exp", "User:Read", "User:Write", "User:Me","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read"})
*
* @Assert\Choice({self::SOURCE_CREATE, self::SOURCE_INVITE, self::SOURCE_IMPORT, self::SOURCE_REGISTER, self::SOURCE_GUEST_VOTER, self::SOURCE_SOCIAL, self::SOURCE_ANONYMOUS_READER, self::SOURCE_INVITE_EXTERNAL})
*/
private $source;
public const SOURCE_CREATE = 'CREATE';
public const SOURCE_INVITE = 'INVITE';
public const SOURCE_IMPORT = 'IMPORT';
public const SOURCE_REGISTER = 'REGISTER';
public const SOURCE_GUEST_VOTER = 'GUEST_VOTER';
public const SOURCE_SOCIAL = 'SOCIAL';
public const SOURCE_ANONYMOUS_READER = 'ANONYMOUS_READER';
public const SOURCE_INVITE_EXTERNAL = 'INVITE_EXTERNAL';
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Exp", "User:Read","User:Write","User:Me", "User:Change-Login-Onboarding", "User:Change-Profile"})
*/
private $isOnboarded = false;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Exp", "User:Imp", "User:Read","User:Get-Admin","User:Get-Admin-List","User:Write","User:Me"})
*/
private $isBlocked = false;
/**
* @ORM\Column(type="datetime", nullable=true)
* @Groups({"User:Exp", "User:Read","User:Write","User:Me", "EventLog:Read","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read"})
*/
private $onboardedAt;
/**
* @ORM\Column(type="datetime", nullable=true)
* @Groups({"User:Exp", "User:Read","User:Write","User:Me", "EventLog:Read","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read"})
*/
private $lastLoginAt;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Exp", "User:Imp", "User:Read","User:Write","User:Me","User:Attendee-List","User:Change-Profile", "User:Change-Login-Onboarding", "User:Get-Open"})
*/
private $isDisplayAsGuest = true;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Exp", "User:Imp", "User:Read","User:Write","User:Me","User:Attendee-List","User:Change-Profile", "User:Change-Login-Onboarding"})
*/
private $isExposeEmail = false;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:EL", "User:Exp", "User:Imp", "User:Read","User:Write","User:Me","User:Attendee-List", "User:Attendee-List-O","User:Change-Profile", "User:Change-Login-Onboarding", "User:Get-Open"})
*/
private $isAllowCommunication = true;
/**
* @ORM\Column(type="string", length=64, nullable=true)
* @Groups({"User:Exp", "User:Imp", "User:Read","User:Write","User:Me","User:Change-Profile"})
*/
private $timezone;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
* @Groups({"User:Read","User:Write","User:Me","User:Change-Profile", "User:Attendee-List"})
* @ApiSubresource(maxDepth=1)
*/
private $relationManager;
/**
* @Groups({"User:Exp", "User:Imp"})
*/
private $rmEmail;
/**
* @Groups({"User:Read","User:Write", "User:Attendee-List", "User:Attendee-List-O", "User:Get-Limited","Session:Select"})
*/
private string $search;
private $tmpRoles;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Read", "User:Write", "User:Me", "User:Change-Profile", "User:Change-Login-Onboarding"})
*/
private $isPwdGenerated = false;
/**
* @ORM\ManyToMany(targetEntity=ChatThread::class, mappedBy="users")
*/
private $chatThreads;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Read", "User:Write", "User:Me", "User:Attendee-List", "User:Change-Profile", "User:Get-Limited","Session:Select", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SessionComment:Read", "Session:Read", "DocFile:Read", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatThread:Read", "ChatMessage:Read", "Session:VideoLibrary", "VoteResult:Read", "SurveyResult:Read", "VoteResult:Exp", "SessionQuestion:Read", "Meeting:Read", "MeetingBooking:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read"})
*/
private $isOnline;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Read", "User:Write", "User:Me", "User:Change-Profile", "User:Change-Login-Onboarding"})
*/
private $isShowDisclaimer = true;
protected $samlAttributes;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"User:Exp", "User:Imp", "Import:Read", "User:Read", "User:Write", "User:Me", "User:Attendee-List", "User:Change-Profile", "User:Get-Limited","Session:Select", "User:Get-Item", "User:PRead"})
*/
private $saLinkedin;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"User:Exp", "User:Imp", "Import:Read", "User:Read", "User:Write", "User:Me", "User:Attendee-List", "User:Change-Profile", "User:Get-Limited","Session:Select", "User:Get-Item", "User:PRead"})
*/
private $saTwitter;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"User:Exp", "User:Imp", "Import:Read", "User:Read", "User:Write", "User:Me", "User:Attendee-List", "User:Change-Profile", "User:Get-Limited","Session:Select", "User:Get-Item", "User:PRead"})
*/
private $saFacebook;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"User:Exp", "User:Imp", "Import:Read", "User:Read", "User:Write", "User:Me", "User:Attendee-List", "User:Change-Profile", "User:Get-Limited","Session:Select", "User:Get-Item", "User:PRead"})
*/
private $saInstagram;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"User:Exp", "User:Imp", "Import:Read", "User:Read", "User:Write", "User:Me", "User:Attendee-List", "User:Change-Profile", "User:Get-Limited","Session:Select", "User:Get-Item", "User:PRead"})
*/
private $saYoutube;
/**
* @ORM\OneToMany(targetEntity=ElTaskAttempt::class, mappedBy="user", orphanRemoval=true)
* @Groups({"User:Me"})
*/
private $elTaskAttempts;
/**
* @ORM\ManyToMany(targetEntity=ElCourse::class, mappedBy="users")
*/
private $elCourses;
/**
* @ORM\OneToMany(targetEntity=ElCourseJoin::class, mappedBy="user", orphanRemoval=true)
* @Groups({"User:Me"})
*/
private $elCourseJoins;
/**
* @ORM\OneToMany(targetEntity=ElExamAttempt::class, mappedBy="user", orphanRemoval=true)
* @Groups({"User:Me"})
*/
private $elExamAttempts;
/**
* @ORM\Column(type="string", length=32, nullable=true)
* @Groups({"User:EL", "User:Exp", "User:Imp", "User:Read","User:Write","User:Me", "User:Attendee-List", "User:Attendee-List-O", "User:Change-Profile", "User:Get-Limited","Session:Select", "WatchTime:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SessionComment:Read", "Session:Read", "Company:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatThread:Read", "ChatMessage:Read", "Session:VideoLibrary", "VoteResult:Read", "SurveyResult:Read", "VoteResult:Exp", "SessionQuestion:Read", "Meeting:Read", "MeetingBooking:Read", "Import:Read", "SessionQuestion:Exp", "VoucherCode:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "User:PRead", "User:Assign-List"})
*/
private $country;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $failAttemptCount;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $lastFailAttemptAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $loginBlockUntilAt;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Read", "User:Write", "User:Me", "User:Attendee-List", "User:Attendee-List-O", "User:Change-Profile", "User:Get-Limited","Session:Select", "User:Get-Item", "User:PRead"})
*/
private $isConsiderSpeaker;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Read", "User:Write", "User:Me", "User:Attendee-List", "User:Attendee-List-O", "User:Change-Profile", "User:Get-Limited","Session:Select", "User:Get-Item", "User:PRead"})
*/
private $isConsiderModerator;
/**
* @ORM\ManyToMany(targetEntity=User::class, inversedBy="followers")
* @Groups({"User:Get-Item", "User:Attendee-List", "User:Get-Following", "User:Get-Open"})
* @ApiProperty(readableLink=false)
*/
private $following;
/**
* @ORM\ManyToMany(targetEntity=User::class, mappedBy="following")
* @Groups({"User:Get-Item", "User:Attendee-List", "User:Get-Followers", "User:Get-Open"})
* @ApiProperty(readableLink=false)
*/
private $followers;
/**
* @var integer
* @Groups({"User:Follow-Unfollow"})
*/
private $folowUnfollowUserId;
/**
* @var bool
* @Groups({"User:Follow-Unfollow"})
*/
private $isUnfollow = false;
/**
* @ORM\OneToMany(targetEntity=NewsfeedLike::class, mappedBy="user")
* @Groups({"User:Me-Subscribed"})
* @MaxDepth(1)
*/
private $newsfeedLikes;
/**
* @ORM\OneToMany(targetEntity=CommonCommentLike::class, mappedBy="user")
* @Groups({"User:Me-Subscribed"})
* @MaxDepth(1)
*/
private $commonCommentLikes;
/**
* @ORM\OneToMany(targetEntity=SessionQuestionLike::class, mappedBy="user")
* @Groups({"User:Me-Subscribed"})
* @MaxDepth(1)
*/
private $sessionQuestionLikes;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Exp", "User:Imp", "User:Read", "User:Write", "Conference:PRead", "Session:PRead", "User:PRead", "ElCourse:PRead", "Company:PRead", "VideoGallery:PRead"})
*/
private $isShowPublic;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Exp", "User:Imp", "User:Read","User:Write","User:Me","User:Attendee-List","User:Change-Profile", "User:Change-Login-Onboarding"})
*/
private $isNotificationAssign = true;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Exp", "User:Imp", "User:Read","User:Write","User:Me","User:Attendee-List","User:Change-Profile", "User:Change-Login-Onboarding"})
*/
private $isNotificationChat = true;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Exp", "User:Imp", "User:Read","User:Write","User:Me","User:Attendee-List","User:Change-Profile", "User:Change-Login-Onboarding"})
*/
private $isNotificationFollow = true;
public const STATIC_FIELD_LOCALE = 'locale';
public const STATIC_FIELD_COMPANY = 'company';
public const STATIC_FIELD_JOBTITLE = 'jobTitle';
public const STATIC_FIELD_TIMEZONE = 'timezone';
public const STATIC_FIELD_COUNTRY = 'country';
public const STATIC_FIELD_IMAGENAME = 'imageName';
public const STATIC_FIELD_GLNNUMBER = 'glnNumber';
public const STATIC_FIELD_ACADEMICTITLES = 'academicTitles';
public const STATIC_FIELD_SPECIALTITLES = 'specialTitles';
public const STATIC_FIELD_HEADLINE = 'headline';
public const STATIC_FIELD_CATEGORIES = 'categories';
public const STATIC_FIELD_ISDISPLAYASGUEST = 'isDisplayAsGuest';
public const STATIC_FIELD_ISEXPOSEEMAIL = 'isExposeEmail';
public const STATIC_FIELD_ISALLOWCOMMUNICATION = 'isAllowCommunication';
public const STATIC_FIELD_ISNOTIFICATIONASSIGN = 'isNotificationAssign';
public const STATIC_FIELD_ISNOTIFICATIONCHAT = 'isNotificationChat';
public const STATIC_FIELD_ISNOTIFICATIONCHATGROUP = 'isNotificationChatGroup';
public const STATIC_FIELD_ISNOTIFICATIONFOLLOW = 'isNotificationFollow';
public const STATIC_FIELD_SALINKEDIN = 'saLinkedin';
public const STATIC_FIELD_SATWITTER = 'saTwitter';
public const STATIC_FIELD_SAFACEBOOK = 'saFacebook';
public const STATIC_FIELD_SAINSTAGRAM = 'saInstagram';
public const STATIC_FIELD_SAYOUTUBE = 'saYoutube';
/**
* @var integer
* @Groups({"User:Change-Role", "User:Container-Feed-Subscribe"})
*/
private $containerId;
/**
* @var string
* @Groups({"User:Change-Role"})
*/
private $roleStr;
private $container;
/**
* @ORM\Column(type="string", length=16, nullable=true)
* @Groups({"User:Exp", "User:Imp", "User:Read","User:Write","User:Me", "User:Attendee-List", "User:Change-Profile", "User:Get-Limited","Session:Select","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "WatchTime:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SessionComment:Read", "Session:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatThread:Read", "ChatMessage:Read", "Session:VideoLibrary", "VoteResult:Read", "VoteResult:Exp", "SessionQuestion:Read", "Meeting:Read", "MeetingBooking:Read", "Import:Read", "SessionQuestion:Exp", "VoucherCode:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read", "ElCourseJoin:Read", "ElTaskAttempt:Read", "ElExamAttempt:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "SurveyResult:Read", "User:PRead"})
*/
private $glnNumber;
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"User:Read","User:Write","User:Me", "User:Attendee-List", "User:PRead"})
*/
private $ord;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $ordState;
private $oldEmail = "";
/**
* @ORM\ManyToMany(targetEntity=Conference::class, mappedBy="registeredUsers")
* @Groups({"User:Me"})
*/
private $registeredToConferences;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Exp", "User:Imp", "User:Read","User:Write","User:Me","User:Attendee-List","User:Change-Profile", "User:Change-Login-Onboarding"})
*/
private $isNotificationChatGroup = true;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"User:Ug-Attach"})
*/
private $inviteCode;
/**
* @ORM\ManyToMany(targetEntity=CommonCategory::class)
* @Groups({"User:EL", "User:Exp", "User:Imp", "User:Read","User:Get-Admin","User:Write","User:Me", "User:Attendee-List", "User:Attendee-List-O", "User:Change-Profile", "User:Get-Limited","Session:Select","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SessionComment:Read", "Session:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatMessage:Read", "Session:VideoLibrary", "VoteResult:Read", "VoteResult:Exp", "SessionQuestion:Read", "Meeting:Read", "MeetingBooking:Read", "Import:Read", "SessionQuestion:Exp", "VoucherCode:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read", "ElCourseJoin:Read", "ElTaskAttempt:Read", "ElExamAttempt:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "SurveyResult:Read", "User:PRead", "Certificate:Read", "User:Assign-List"})
*/
private $categories;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"User:EL", "User:Exp", "User:Imp", "User:Read","User:Get-Admin","User:Get-Admin-List","User:Write","User:Me", "User:Attendee-List", "User:Attendee-List-O", "User:Change-Profile", "User:Get-Limited","Session:Select","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SessionComment:Read", "Session:Read", "Company:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatThread:Read", "ChatMessage:Read", "Session:VideoLibrary", "VoteResult:Read", "VoteResult:Exp", "SessionQuestion:Read", "Meeting:Read", "MeetingBooking:Read", "Import:Read", "SessionQuestion:Exp", "VoucherCode:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read", "ElCourseJoin:Read", "ElTaskAttempt:Read", "ElExamAttempt:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "SurveyResult:Read", "User:PRead", "Certificate:Read", "ElLession:Detail", "User:Assign-List"})
*/
private $headline;
/**
* @ORM\ManyToMany(targetEntity=SpecialTitle::class)
* @Groups({"User:EL", "User:Exp", "User:Imp", "User:Read","User:Get-Admin","User:Write","User:Me", "User:Attendee-List", "User:Attendee-List-O", "User:Change-Profile", "User:Get-Limited","Session:Select","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SessionComment:Read", "Session:Read", "Company:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatMessage:Read", "Session:VideoLibrary", "VoteResult:Read", "VoteResult:Exp", "SessionQuestion:Read", "Meeting:Read", "MeetingBooking:Read", "Import:Read", "SessionQuestion:Exp", "VoucherCode:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read", "ElCourseJoin:Read", "ElTaskAttempt:Read", "ElExamAttempt:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "SurveyResult:Read", "Certificate:Read", "User:Assign-List", "User:PRead"})
*/
private $specialTitles;
/**
* @ORM\OneToMany(targetEntity=UserAcademicTitle::class, mappedBy="user", orphanRemoval=true, cascade={"persist"})
* @Groups({"User:EL", "User:Imp", "User:Read","User:Get-Admin","User:Write","User:Me", "User:Attendee-List", "User:Attendee-List-O", "User:Change-Profile", "User:Get-Limited","Session:Select","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SessionComment:Read", "Session:Read", "Company:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatThread:Read", "ChatMessage:Read", "Session:VideoLibrary", "VoteResult:Read", "VoteResult:Exp", "SessionQuestion:Read", "Meeting:Read", "MeetingBooking:Read", "Import:Read", "SessionQuestion:Exp", "VoucherCode:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read", "ElCourseJoin:Read", "ElTaskAttempt:Read", "ElExamAttempt:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "SurveyResult:Read", "User:PRead", "User:PSRead", "Certificate:Read", "ElLession:Detail", "User:Assign-List", "ElCourseRating:Read", "User:Get-Open"})
*/
private $userAcademicTitles;
private ?string $academicTitles = "";
/**
* @ORM\OneToMany(targetEntity=UserCreditPoint::class, mappedBy="user", orphanRemoval=true)
*/
private $userCreditPoints;
/**
* @ORM\ManyToOne(targetEntity=Container::class)
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
* @Groups({"User:Read","User:Me"})
*/
private $userContainer;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"User:Read","User:Me"})
*/
private $userContainerDomain;
/**
* @ORM\ManyToMany(targetEntity=EmailChanel::class, inversedBy="users")
* @Groups({"User:EL", "User:Read","User:Get-Admin","User:Write","User:Me", "User:Change-Profile", "User:Get-Limited","Session:Select","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "EventLog:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "SessionComment:Read", "Session:Read", "DocFile:Read", "Session:PRead", "Conference:Read", "Conference:PRead", "ElCourse:PRead", "Session:Agenda", "Newsfeed:Read", "NewsfeedComment:Read", "ChatMessage:Read", "Session:VideoLibrary", "VoteResult:Read", "VoteResult:Exp", "SessionQuestion:Read", "Meeting:Read", "MeetingBooking:Read", "Import:Read", "SessionQuestion:Exp", "VoucherCode:Read", "ElCourse:Read", "ElTask:Read", "VideoLibrary:Read", "ElExamAttempt:Read", "ElExamAnswer:Read", "ElCourseJoin:Read", "ElTaskAttempt:Read", "ElExamAttempt:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:PRead", "SurveyResult:Read", "Certificate:Read", "User:Assign-List"})
*/
private $unsubscribedEmailChanels;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Read"})
*/
private $isUnsubscribedInvite;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"User:Read", "User:Write"})
*/
private $isEmailOff;
/**
* @ORM\ManyToOne(targetEntity=Company::class, inversedBy="users")
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
* @Groups({"User:Read", "User:Write", "User:Me", "User:Change-Profile", "User:PRead"})
*/
private $organization;
/**
* @ORM\ManyToMany(targetEntity=Company::class, inversedBy="followers")
* @ORM\JoinTable(name="rel_user_follow_company")
* @Groups({"User:Me"})
*/
private $followingCompanies;
/**
* @ORM\ManyToMany(targetEntity=Company::class, inversedBy="offNotificationUsers")
* @ORM\JoinTable(name="rel_user_notification_company")
* @Groups({"User:Me"})
*/
private $offCompanyNotifications;
/**
* @var integer
* @Groups({"User:Follow-Unfollow-Company", "User:Notification-Company"})
*/
private $companyId;
/**
* @ORM\OneToMany(targetEntity=Transaction::class, mappedBy="user")
*/
private $transactions;
/**
* @ORM\ManyToMany(targetEntity=CommonCategory::class, inversedBy="newsfeedSubscribedUsers")
* @ORM\JoinTable(name="rel_user_newsfeed_subscribe")
* @Groups({"User:Read","User:Get-Admin","User:Write","User:Me", "User:Change-Profile"})
*/
private $newsfeedSubscriptions;
/**
* @Groups({"User:Read","User:Get-Admin","User:Get-Admin-List","User:Write","User:Me", "User:Change-Profile"})
*/
private $isUpdateNewsfeedSubscriptions;
/**
* @Groups({"User:Feed-Subscribe", "User:Container-Feed-Send"})
*/
private $newsfeedSubscriptionId;
/**
* @ORM\ManyToMany(targetEntity=Container::class)
* @Groups({"User:Read", "User:Get-Admin","User:Me", "User:Change-Profile"})
*/
private $newsfeedContainerSubscriptions;
/**
* @ORM\OneToMany(targetEntity=DocFileSaved::class, mappedBy="user", orphanRemoval=true)
* @Groups({"User:Me"})
*/
private $docFileSaveds;
public function getContainer()
{
return $this->container;
}
public function setContainer($container): self
{
$this->container = $container;
return $this;
}
public function __toString()
{
return $this->getFirstName().' '.$this->getLastName();
}
public function __construct()
{
parent::__construct();
$this->roles = new ArrayCollection();
$this->roleContainers = new ArrayCollection();
$this->userGroups = new ArrayCollection();
$this->userTags = new ArrayCollection();
$this->chatThreads = new ArrayCollection();
$this->elTaskAttempts = new ArrayCollection();
$this->elCourses = new ArrayCollection();
$this->elCourseJoins = new ArrayCollection();
$this->elExamAttempts = new ArrayCollection();
$this->following = new ArrayCollection();
$this->followers = new ArrayCollection();
$this->newsfeedLikes = new ArrayCollection();
$this->commonCommentLikes = new ArrayCollection();
$this->sessionQuestionLikes = new ArrayCollection();
$this->registeredToConferences = new ArrayCollection();
$this->categories = new ArrayCollection();
$this->specialTitles = new ArrayCollection();
$this->userAcademicTitles = new ArrayCollection();
$this->userCreditPoints = new ArrayCollection();
$this->unsubscribedEmailChanels = new ArrayCollection();
$this->followingCompanies = new ArrayCollection();
$this->offCompanyNotifications = new ArrayCollection();
$this->transactions = new ArrayCollection();
$this->newsfeedSubscriptions = new ArrayCollection();
$this->newsfeedContainerSubscriptions = new ArrayCollection();
$this->docFileSaveds = new ArrayCollection();
}
protected function createTranslation(): TranslationInterface
{
return new UserTranslation();
}
public function addTranslation(TranslationInterface $translation): void
{
$this->setUpdatedAt(new \DateTime());
parent::addTranslation($translation);
}
public function getBiography(): ?string
{
return $this->getTranslation()->getBiography();
}
public function setBiography(string $biography): self
{
$this->getTranslation()->setBiography($biography);
return $this;
}
public function getId(): ?int
{
return $this->id;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->oldEmail = $this->email;
if (substr($email, -strlen(EsEncrypt::MARKER)) !== EsEncrypt::MARKER) {
$email = strtolower($email);
}
$this->email = $email;
return $this;
}
public function getOldEmail(): ?string
{
return $this->oldEmail;
}
public function getUserIdentifier(): string
{
return (string) $this->email;
}
/**
* A visual identifier that represents this user.
*
* @see UserInterface
*/
public function getUsername(): string
{
return (string) $this->email;
}
/**
* @see UserInterface
*/
public function getPassword(): string
{
return (string) $this->password;
}
public function setPassword(string $password): self
{
$this->password = $password;
return $this;
}
public function getPlainPassword(): ?string
{
return $this->plainPassword;
}
public function setPlainPassword(string $plainPassword): self
{
$this->plainPassword = $plainPassword;
return $this;
}
public function getOldPassword(): ?string
{
return $this->oldPassword;
}
public function setOldPassword(string $oldPassword): self
{
$this->oldPassword = $oldPassword;
return $this;
}
/**
* @see UserInterface
*/
public function getSalt(): ?string
{
// not needed when using the "bcrypt" algorithm in security.yaml
return null;
}
/**
* @see UserInterface
*/
public function eraseCredentials()
{
// If you store any temporary, sensitive data on the user, clear it here
$this->plainPassword = null;
}
public function getFirstName(): ?string
{
return $this->firstName;
}
public function setFirstName(?string $firstName): self
{
$this->firstName = $firstName;
return $this;
}
public function getLastName(): ?string
{
return $this->lastName;
}
public function setLastName(?string $lastName): self
{
$this->lastName = $lastName;
return $this;
}
/**
* @Groups({"User:EL", "User:Get-Admin","User:Get-Admin-List", "Conference:EL", "Session:EL", "VideoGallery:EL", "ElCourse:EL", "ElTask:EL", "Newsfeed:EL", "DocFile:EL"})
* @SerializedName("fullName")
*/
public function getFullName()
{
$fullName = $this->getFirstName();
if (!empty($this->lastName)) {
$fullName .= ' '.$this->getLastName();
}
return $fullName;
}
public function getLocale(): ?string
{
return $this->locale;
}
public function setLocale(?string $locale): self
{
$this->locale = $locale;
return $this;
}
public function getClient(): ?Client
{
return $this->client;
}
public function setClient(?Client $client): self
{
$this->client = $client;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(string $status): self
{
$this->status = $status;
return $this;
}
public function getOldRole()
{
$roles = [];
foreach ($this->roles as $role) {
$roles[] = $role->getRole();
}
return $roles[0] ?? Role::ROLE_USER;
}
/*
public function addRole(Role $role): self
{
//if (!$this->roles->contains($role)) {
//$role->addUser($this);
$this->roles = [$role];
//}
return $this;
}
*/
/**
* @Groups({"User:Exp", "User:Read", "User:Me"})
* @SerializedName("roles")
*/
public function getRolesArray()
{
$roles = [];
foreach ($this->roleContainers as $roleContainer) {
// $roles[] = $roleContainer->getRole();
if (!empty($this->container) && $this->container->getId() === $roleContainer->getContainer()->getId()) {
$roles[] = $roleContainer->getRole();
}
}
return $roles;
}
/**
* @Groups({"User:Read","User:Get-Admin","User:Get-Admin-List"})
* @SerializedName("role")
*/
public function getRole()
{
$roles = [];
foreach ($this->roleContainers as $roleContainer) {
// $roles[] = $roleContainer->getRole();
if (!empty($this->container) && $this->container->getId() === $roleContainer->getContainer()->getId()) {
$roles[] = $roleContainer->getRole();
}
}
return $roles[0] ?? Role::ROLE_USER;
}
/**
* @return Collection|string[]
*/
public function getRoles()
{
//return ['ROLE_SUPER_ADMIN'];
//return (array)$this->roles;
$roles = [];
foreach ($this->roleContainers as $roleContainer) {
// $roles[] = $roleContainer->getRole();
if (!empty($this->container) && $this->container->getId() === $roleContainer->getContainer()->getId()) {
$roles[] = $roleContainer->getRole();
}
}
return $roles;
}
/**
* @return Collection|RoleContainer[]
*/
public function getRoleContainers(): Collection
{
return $this->roleContainers;
}
public function addRoleContainer(RoleContainer $roleContainer): self
{
if (!$this->roleContainers->contains($roleContainer)) {
$this->removeRoleContainer(null, $roleContainer->getContainer());
$this->roleContainers[] = $roleContainer;
$roleContainer->setUser($this);
if (!empty($this->container) && empty($roleContainer->getContainer())) {
$roleContainer->setContainer($this->container);
} elseif (empty($this->container) && isset($GLOBALS['container'])) {
$roleContainer->setContainer($GLOBALS['container']);
}
}
return $this;
}
/**
* @Groups({"User:Imp", "User:Write", "User:Global-Create"})
* @SerializedName("role")
*/
public function setRoleContainer($inputRole): self
{
if (!is_array($inputRole)) {
$inputRole = [$inputRole];
}
foreach ($inputRole as $role) {
$found = false;
$newRoleContainer = new RoleContainer($role);
foreach ($this->roleContainers as $roleContainer) {
if (!empty($this->container) && $this->container->getId() === $roleContainer->getContainer()->getId()) {
$roleContainer->setRole($role);
$found = true;
break;
}
}
if (!$found) {
$this->addRoleContainer($newRoleContainer);
}
}
return $this;
}
public function removeRoleContainer(RoleContainer $roleContainer = null, $container = null): self
{
if (!empty($roleContainer) && $this->roleContainers->removeElement($roleContainer)) {
// set the owning side to null (unless already changed)
if ($roleContainer->getUser() === $this) {
$roleContainer->setUser(null);
}
}
if (!empty($container)) {
foreach ($this->roleContainers as $roleContainer) {
if ($container->getId() === $roleContainer->getContainer()->getId()) {
$this->roleContainers->removeElement($roleContainer);
if ($roleContainer->getUser() === $this) {
$roleContainer->setUser(null);
}
}
}
}
return $this;
}
public function hasRoleContainers($inputRole): bool
{
$inputRole = (is_array($inputRole)) ? $inputRole : [$inputRole];
foreach ($this->roleContainers as $er) {
foreach ($inputRole as $ir) {
if ($er->getRole() === $ir) {
return true;
}
}
}
return false;
}
public function hasRoleContainersContainer($containerId): bool
{
foreach ($this->roleContainers as $erc) {
if ($erc->getContainer()->getId() === $containerId) {
return true;
}
}
return false;
}
/**
* @Groups({"User:Imp"})
* @SerializedName("roles")
*/
public function setTmpRoles($tmpRoles): self
{
$this->tmpRoles = $tmpRoles;
return $this;
}
public function getTmpRoles(): ?string
{
return empty($this->tmpRoles) ? RoleContainer::ROLE_USER : $this->tmpRoles;
}
/**
* @return Collection|UserGroup[]
*/
public function getUserGroups(): Collection
{
return $this->userGroups;
}
public function getUserGroupsArray()
{
$groups = [];
foreach ($this->userGroups as $group) {
if (!$group->getIsGenerated()) {
$groups[] = $group->getId();
}
}
return $groups;
}
public function getUserGroupIds()
{
$ids = [];
foreach ($this->userGroups as $group) {
$ids[] = $group->getId();
}
return $ids;
}
public function addUserGroup(UserGroup $userGroup): self
{
if (!$this->hasUserGroup($userGroup)) {
$this->userGroups[] = $userGroup;
}
return $this;
}
public function setUserGroups($userGroups): self
{
if ($userGroups) {
foreach ($userGroups as $userGroup) {
$this->addUserGroup($userGroup);
}
}
return $this;
}
public function removeUserGroup(UserGroup $userGroup): self
{
$this->userGroups->removeElement($userGroup);
return $this;
}
public function hasUserGroup(UserGroup $userGroup): bool
{
return $this->userGroups->exists(
function ($k, $v) use ($userGroup) {
return $v->getName() === $userGroup->getName();
}
);
}
public function hasContainerUserGroups($container)
{
foreach ($container->getUserGroups() as $cug) {
if ($cug->getIsGenerated() && $this->hasUserGroup($cug)) {
return true;
}
}
return false;
}
/**
* @return Collection|UserTag[]
*/
public function getUserTags(): Collection
{
return $this->userTags;
}
/**
* @Groups({"User:EL"})
* @SerializedName("tags")
*/
public function getTagsArray()
{
$tags = [];
foreach ($this->userTags as $tag) {
$tags[] = $tag->getName();
}
return $tags;
}
public function addUserTag(UserTag $userTag): self
{
if (!$this->userTags->contains($userTag)) {
$this->userTags[] = $userTag;
$userTag->addUser($this);
}
return $this;
}
public function removeUserTag(UserTag $userTag): self
{
if ($this->userTags->removeElement($userTag)) {
$userTag->removeUser($this);
}
return $this;
}
public function getCompany()
{
return $this->company;
}
public function setCompany($company)
{
$this->company = $company;
return $this;
}
public function getJobTitle()
{
return $this->jobTitle;
}
public function setJobTitle($jobTitle)
{
$this->jobTitle = $jobTitle;
return $this;
}
public function getImageName(): ?string
{
return $this->imageName;
}
public function setImageName(?string $imageName): self
{
$this->imageName = $imageName;
return $this;
}
public function getSource(): ?string
{
return $this->source;
}
public function setSource(string $source): self
{
$this->source = $source;
return $this;
}
public function getIsOnboarded(): ?bool
{
return $this->isOnboarded;
}
public function setIsOnboarded(?bool $isOnboarded): self
{
$this->isOnboarded = $isOnboarded;
return $this;
}
public function getIsBlocked(): ?bool
{
return $this->isBlocked;
}
public function setIsBlocked(?bool $isBlocked): self
{
$this->isBlocked = $isBlocked;
return $this;
}
public function getOnboardedAt(): ?\DateTimeInterface
{
return $this->onboardedAt;
}
public function setOnboardedAt(?\DateTimeInterface $onboardedAt): self
{
$this->onboardedAt = $onboardedAt;
return $this;
}
public function getLastLoginAt(): ?\DateTimeInterface
{
return $this->lastLoginAt;
}
public function setLastLoginAt(?\DateTimeInterface $lastLoginAt): self
{
$this->lastLoginAt = $lastLoginAt;
return $this;
}
public function getIsDisplayAsGuest(): ?bool
{
return $this->isDisplayAsGuest;
}
public function setIsDisplayAsGuest(?bool $isDisplayAsGuest): self
{
$this->isDisplayAsGuest = $isDisplayAsGuest;
return $this;
}
public function getIsExposeEmail(): ?bool
{
return $this->isExposeEmail;
}
public function setIsExposeEmail(?bool $isExposeEmail): self
{
$this->isExposeEmail = $isExposeEmail;
return $this;
}
public function getIsAllowCommunication(): ?bool
{
return $this->isAllowCommunication;
}
public function setIsAllowCommunication(?bool $isAllowCommunication): self
{
$this->isAllowCommunication = $isAllowCommunication;
return $this;
}
public function getTimezone(): ?string
{
/*
if (empty($this->timezone) && defined('_USER_TIMEZONE_')) {
return _USER_TIMEZONE_;
}
*/
return $this->timezone;
}
public function setTimezone(?string $timezone): self
{
$this->timezone = $timezone;
return $this;
}
public function getRelationManager(): ?self
{
return $this->relationManager;
}
public function setRelationManager(?self $relationManager): self
{
$this->relationManager = $relationManager;
return $this;
}
public function getRmEmail(): ?string
{
if (!empty($this->rmEmail)) {
return $this->rmEmail;
} else {
return $this->getRelationManager() ? $this->getRelationManager()->getEmail() : '';
}
}
public function setRmEmail(?string $rmEmail): self
{
$this->rmEmail = $rmEmail;
return $this;
}
/**
* @Groups({"User:Read", "User:Me", "User:Attendee-List", "User:Get-Limited","Session:Select", "Meeting:Read", "EventLog:Read","VideoGalleryHistory:Read" , "JobQueue:Read", "AccessLog:Read", "CommonComment:Read", "CommonCommentLike:Read", "SessionQuestionLike:Read", "NewsfeedLike:Read", "SessionReaction:Read", "ChatThread:Read", "Session:Read", "DocFile:Read", "Session:PRead", "ElCourse:Read", "ElTask:Read", "ElExam:Read", "VideoGallery:Read", "VideoGallery:Read-Public", "SessionQuestion:Read", "VideoGallery:PRead"})
* @SerializedName("userType")
*/
public function getUserType()
{
$roles = $this->getRoles();
if (isset($roles[0])) {
return strtolower(substr($roles[0], 5));
}
return null;
}
public function getIsPwdGenerated(): ?bool
{
return $this->isPwdGenerated;
}
public function setIsPwdGenerated(?bool $isPwdGenerated): self
{
$this->isPwdGenerated = $isPwdGenerated;
return $this;
}
/**
* @return Collection|ChatThread[]
*/
public function getChatThreads(): Collection
{
return $this->chatThreads;
}
public function addChatThread(ChatThread $chatThread): self
{
if (!$this->chatThreads->contains($chatThread)) {
$this->chatThreads[] = $chatThread;
$chatThread->addUsr($this);
}
return $this;
}
public function removeChatThread(ChatThread $chatThread): self
{
if ($this->chatThreads->removeElement($chatThread)) {
$chatThread->removeUsr($this);
}
return $this;
}
public function getIsOnline(): ?bool
{
return $this->isOnline;
}
public function setIsOnline(?bool $isOnline): self
{
$this->isOnline = $isOnline;
return $this;
}
public function getIsShowDisclaimer(): ?bool
{
return $this->isShowDisclaimer;
}
public function setIsShowDisclaimer(?bool $isShowDisclaimer): self
{
$this->isShowDisclaimer = $isShowDisclaimer;
return $this;
}
public function setSamlAttributes(array $attributes)
{
$this->samlAttributes = $attributes;
}
public function getSamlAttributes()
{
return $this->samlAttributes;
}
public function getSaLinkedin(): ?string
{
return $this->saLinkedin;
}
public function setSaLinkedin(?string $saLinkedin): self
{
$this->saLinkedin = $saLinkedin;
return $this;
}
public function getSaTwitter(): ?string
{
return $this->saTwitter;
}
public function setSaTwitter(?string $saTwitter): self
{
$this->saTwitter = $saTwitter;
return $this;
}
public function getSaFacebook(): ?string
{
return $this->saFacebook;
}
public function setSaFacebook(?string $saFacebook): self
{
$this->saFacebook = $saFacebook;
return $this;
}
public function getSaInstagram(): ?string
{
return $this->saInstagram;
}
public function setSaInstagram(?string $saInstagram): self
{
$this->saInstagram = $saInstagram;
return $this;
}
public function getSaYoutube(): ?string
{
return $this->saYoutube;
}
public function setSaYoutube(?string $saYoutube): self
{
$this->saYoutube = $saYoutube;
return $this;
}
/**
* @return Collection|ElTaskAttempt[]
*/
public function getElTaskAttempts(): Collection
{
return $this->elTaskAttempts;
}
public function addElTaskAttempt(ElTaskAttempt $elTaskAttempt): self
{
if (!$this->elTaskAttempts->contains($elTaskAttempt)) {
$this->elTaskAttempts[] = $elTaskAttempt;
$elTaskAttempt->setUser($this);
}
return $this;
}
public function removeElTaskAttempt(ElTaskAttempt $elTaskAttempt): self
{
if ($this->elTaskAttempts->removeElement($elTaskAttempt)) {
// set the owning side to null (unless already changed)
if ($elTaskAttempt->getUser() === $this) {
$elTaskAttempt->setUser(null);
}
}
return $this;
}
/**
* @return Collection|ElCourse[]
*/
public function getElCourses(): Collection
{
return $this->elCourses;
}
public function addElCourse(ElCourse $elCourse): self
{
if (!$this->elCourses->contains($elCourse)) {
$this->elCourses[] = $elCourse;
$elCourse->addUser($this);
}
return $this;
}
public function removeElCourse(ElCourse $elCourse): self
{
if ($this->elCourses->removeElement($elCourse)) {
$elCourse->removeUser($this);
}
return $this;
}
/**
* @return Collection|ElCourseJoin[]
*/
public function getElCourseJoins(): Collection
{
return $this->elCourseJoins;
}
public function addElCourseJoin(ElCourseJoin $elCourseJoin): self
{
if (!$this->elCourseJoins->contains($elCourseJoin)) {
$this->elCourseJoins[] = $elCourseJoin;
$elCourseJoin->setUser($this);
}
return $this;
}
public function removeElCourseJoin(ElCourseJoin $elCourseJoin): self
{
if ($this->elCourseJoins->removeElement($elCourseJoin)) {
// set the owning side to null (unless already changed)
if ($elCourseJoin->getUser() === $this) {
$elCourseJoin->setUser(null);
}
}
return $this;
}
/**
* @return Collection|ElExamAttempt[]
*/
public function getElExamAttempts(): Collection
{
return $this->elExamAttempts;
}
public function addElExamAttempt(ElExamAttempt $elExamAttempt): self
{
if (!$this->elExamAttempts->contains($elExamAttempt)) {
$this->elExamAttempts[] = $elExamAttempt;
$elExamAttempt->setUser($this);
}
return $this;
}
public function removeElExamAttempt(ElExamAttempt $elExamAttempt): self
{
if ($this->elExamAttempts->removeElement($elExamAttempt)) {
// set the owning side to null (unless already changed)
if ($elExamAttempt->getUser() === $this) {
$elExamAttempt->setUser(null);
}
}
return $this;
}
public function getCountry(): ?string
{
return $this->country;
}
public function setCountry(?string $country): self
{
$this->country = $country;
return $this;
}
public function getFailAttemptCount(): ?int
{
return $this->failAttemptCount;
}
public function setFailAttemptCount(?int $failAttemptCount): self
{
$this->failAttemptCount = $failAttemptCount;
return $this;
}
public function getLastFailAttemptAt(): ?\DateTimeInterface
{
return $this->lastFailAttemptAt;
}
public function setLastFailAttemptAt(?\DateTimeInterface $lastFailAttemptAt): self
{
$this->lastFailAttemptAt = $lastFailAttemptAt;
return $this;
}
public function getLoginBlockUntilAt(): ?\DateTimeInterface
{
return $this->loginBlockUntilAt;
}
public function setLoginBlockUntilAt(?\DateTimeInterface $loginBlockUntilAt): self
{
$this->loginBlockUntilAt = $loginBlockUntilAt;
return $this;
}
public function getIsConsiderSpeaker(): ?bool
{
return $this->isConsiderSpeaker;
}
public function setIsConsiderSpeaker(?bool $isConsiderSpeaker): self
{
$this->isConsiderSpeaker = $isConsiderSpeaker;
return $this;
}
public function getIsConsiderModerator(): ?bool
{
return $this->isConsiderModerator;
}
public function setIsConsiderModerator(?bool $isConsiderModerator): self
{
$this->isConsiderModerator = $isConsiderModerator;
return $this;
}
/**
* @return Collection|self[]
*/
public function getFollowing(): Collection
{
return $this->following;
}
public function addFollowing(self $following): self
{
if (!$this->following->contains($following)) {
$this->following[] = $following;
}
return $this;
}
public function removeFollowing(self $following): self
{
$this->following->removeElement($following);
return $this;
}
/**
* @return Collection|self[]
*/
public function getFollowers(): Collection
{
return $this->followers;
}
public function addFollower(self $follower): self
{
if (!$this->followers->contains($follower)) {
$this->followers[] = $follower;
$follower->addFollowing($this);
}
return $this;
}
public function removeFollower(self $follower): self
{
if ($this->followers->removeElement($follower)) {
$follower->removeFollowing($this);
}
return $this;
}
/**
* @return integer
*/
public function getFolowUnfollowUserId()
{
return $this->folowUnfollowUserId;
}
/**
* @param integer $folowUnfollowUserId
*
* @return self
*/
public function setFolowUnfollowUserId($folowUnfollowUserId)
{
$this->folowUnfollowUserId = $folowUnfollowUserId;
return $this;
}
/**
* @return bool
*/
public function getIsUnfollow()
{
return $this->isUnfollow;
}
/**
* @param bool $isUnfollow
*
* @return self
*/
public function setIsUnfollow(bool $isUnfollow)
{
$this->isUnfollow = $isUnfollow;
return $this;
}
public function getMetadata()
{
return [
'id' => $this->getId(),
'firstName' => $this->getFirstName(),
'lastName' => $this->getLastName(),
'jobTitle' => $this->getJobTitle(),
'company' => $this->getCompany(),
'country' => $this->getCountry(),
'userType' => $this->getUserType(),
'imageName' => $this->getImageName()
];
}
/**
* @return Collection|NewsfeedLike[]
*/
public function getNewsfeedLikes(): Collection
{
return $this->newsfeedLikes;
}
public function addNewsfeedLike(NewsfeedLike $newsfeedLike): self
{
if (!$this->newsfeedLikes->contains($newsfeedLike)) {
$this->newsfeedLikes[] = $newsfeedLike;
$newsfeedLike->setUser($this);
}
return $this;
}
public function removeNewsfeedLike(NewsfeedLike $newsfeedLike): self
{
if ($this->newsfeedLikes->removeElement($newsfeedLike)) {
// set the owning side to null (unless already changed)
if ($newsfeedLike->getUser() === $this) {
$newsfeedLike->setUser(null);
}
}
return $this;
}
/**
* @return Collection|CommonCommentLike[]
*/
public function getCommonCommentLikes(): Collection
{
return $this->commonCommentLikes;
}
public function addCommonCommentLike(CommonCommentLike $commonCommentLike): self
{
if (!$this->commonCommentLikes->contains($commonCommentLike)) {
$this->commonCommentLikes[] = $commonCommentLike;
$commonCommentLike->setUser($this);
}
return $this;
}
public function removeCommonCommentLike(CommonCommentLike $commonCommentLike): self
{
if ($this->commonCommentLikes->removeElement($commonCommentLike)) {
// set the owning side to null (unless already changed)
if ($commonCommentLike->getUser() === $this) {
$commonCommentLike->setUser(null);
}
}
return $this;
}
/**
* @return Collection|SessionQuestionLike[]
*/
public function getSessionQuestionLikes(): Collection
{
return $this->sessionQuestionLikes;
}
public function addSessionQuestionLike(SessionQuestionLike $sessionQuestionLike): self
{
if (!$this->sessionQuestionLikes->contains($sessionQuestionLike)) {
$this->sessionQuestionLikes[] = $sessionQuestionLike;
$sessionQuestionLike->setUser($this);
}
return $this;
}
public function removeSessionQuestionLike(SessionQuestionLike $sessionQuestionLike): self
{
if ($this->sessionQuestionLikes->removeElement($sessionQuestionLike)) {
// set the owning side to null (unless already changed)
if ($sessionQuestionLike->getUser() === $this) {
$sessionQuestionLike->setUser(null);
}
}
return $this;
}
public function getIsShowPublic(): ?bool
{
return $this->isShowPublic;
}
public function setIsShowPublic(?bool $isShowPublic): self
{
$this->isShowPublic = $isShowPublic;
return $this;
}
public function getIsNotificationAssign(): ?bool
{
return $this->isNotificationAssign;
}
public function setIsNotificationAssign(?bool $isNotificationAssign): self
{
$this->isNotificationAssign = $isNotificationAssign;
return $this;
}
public function getIsNotificationChat(): ?bool
{
return $this->isNotificationChat;
}
public function setIsNotificationChat(?bool $isNotificationChat): self
{
$this->isNotificationChat = $isNotificationChat;
return $this;
}
public function getIsNotificationFollow(): ?bool
{
return $this->isNotificationFollow;
}
public function setIsNotificationFollow(?bool $isNotificationFollow): self
{
$this->isNotificationFollow = $isNotificationFollow;
return $this;
}
/**
* Get the value of containerId
*
* @return integer
*/
public function getContainerId()
{
return $this->containerId;
}
/**
* Set the value of containerId
*
* @param integer $containerId
*
* @return self
*/
public function setContainerId($containerId)
{
$this->containerId = $containerId;
return $this;
}
/**
* Get the value of roleStr
*
* @return string
*/
public function getRoleStr()
{
return $this->roleStr;
}
/**
* Set the value of roleStr
*
* @param string $roleStr
*
* @return self
*/
public function setRoleStr(string $roleStr)
{
$this->roleStr = $roleStr;
return $this;
}
public function getGlnNumber(): ?string
{
return $this->glnNumber;
}
public function setGlnNumber(?string $glnNumber): self
{
$this->glnNumber = $glnNumber;
return $this;
}
public function getOrd(): ?int
{
return $this->ord;
}
public function setOrd(?int $ord): self
{
$this->ord = $ord;
$this->setOrdState($ord < 1);
return $this;
}
public function getOrdState(): ?int
{
return $this->ordState;
}
public function setOrdState(?int $ordState): self
{
$this->ordState = $ordState;
return $this;
}
/**
* @return Collection<int, Conference>
*/
public function getRegisteredToConferences(): Collection
{
return $this->registeredToConferences;
}
public function addRegisteredToConference(Conference $registeredToConference): self
{
if (!$this->registeredToConferences->contains($registeredToConference)) {
$this->registeredToConferences[] = $registeredToConference;
$registeredToConference->addRegisteredUser($this);
}
return $this;
}
public function removeRegisteredToConference(Conference $registeredToConference): self
{
if ($this->registeredToConferences->removeElement($registeredToConference)) {
$registeredToConference->removeRegisteredUser($this);
}
return $this;
}
public function isIsNotificationChatGroup(): ?bool
{
return $this->isNotificationChatGroup;
}
public function setIsNotificationChatGroup(?bool $isNotificationChatGroup): self
{
$this->isNotificationChatGroup = $isNotificationChatGroup;
return $this;
}
/**
* @Groups({"User:EL"})
*/
public function getCliId()
{
return $this->client->getId();
}
public function getQueueInfo(): array
{
return [
'type' => 'User',
'id' => $this->getId()
];
}
public function getInviteCode(): ?string
{
return $this->inviteCode;
}
public function setInviteCode(?string $inviteCode): self
{
$this->inviteCode = $inviteCode;
return $this;
}
/**
* @return Collection<int, CommonCategory>
*/
public function getCategories(): Collection
{
return $this->categories;
}
public function addCategory(CommonCategory $category): self
{
if (!$this->categories->contains($category)) {
$this->categories[] = $category;
}
return $this;
}
public function removeCategory(CommonCategory $category): self
{
$this->categories->removeElement($category);
return $this;
}
public function getHeadline(): ?string
{
return $this->headline;
}
public function setHeadline(?string $headline): self
{
$this->headline = $headline;
return $this;
}
/**
* @return Collection<int, SpecialTitle>
*/
public function getSpecialTitles(): Collection
{
return $this->specialTitles;
}
public function addSpecialTitle(SpecialTitle $specialTitle): self
{
if (!$this->specialTitles->contains($specialTitle)) {
$this->specialTitles[] = $specialTitle;
}
return $this;
}
public function removeSpecialTitle(SpecialTitle $specialTitle): self
{
$this->specialTitles->removeElement($specialTitle);
return $this;
}
/**
* @return Collection<int, UserAcademicTitle>
*/
public function getUserAcademicTitles(): Collection
{
return $this->userAcademicTitles;
}
public function addUserAcademicTitle(UserAcademicTitle $userAcademicTitle): self
{
if (!$this->userAcademicTitles->contains($userAcademicTitle)) {
$this->userAcademicTitles[] = $userAcademicTitle;
$userAcademicTitle->setUser($this);
}
return $this;
}
public function removeUserAcademicTitle(UserAcademicTitle $userAcademicTitle): self
{
// if ($this->userAcademicTitles->removeElement($userAcademicTitle)) {
// // set the owning side to null (unless already changed)
// if ($userAcademicTitle->getUser() === $this) {
// $userAcademicTitle->setUser(null);
// }
// }
$this->userAcademicTitles->removeElement($userAcademicTitle);
return $this;
}
public function removeAllUserAcademicTitle(): self
{
$this->userAcademicTitles->clear();
return $this;
}
/**
* @Groups({"User:Exp"})
* @SerializedName("academicTitles")
*/
public function getAcademicTitles()
{
$ats = [];
foreach ($this->userAcademicTitles as $at) {
$ats[] = $at->getAcademicTitle()->getId();
}
return implode(",", $ats);
}
/**
* @Groups({"User:Imp"})
* @SerializedName("academicTitles")
*/
public function setAcademicTitles(?string $academicTitles)
{
$this->academicTitles = $academicTitles;
}
/**
* @return Collection<int, UserCreditPoint>
*/
public function getUserCreditPoints(): Collection
{
return $this->userCreditPoints;
}
public function addUserCreditPoint(UserCreditPoint $userCreditPoint): self
{
if (!$this->userCreditPoints->contains($userCreditPoint)) {
$this->userCreditPoints[] = $userCreditPoint;
$userCreditPoint->setUser($this);
}
return $this;
}
public function removeUserCreditPoint(UserCreditPoint $userCreditPoint): self
{
if ($this->userCreditPoints->removeElement($userCreditPoint)) {
// set the owning side to null (unless already changed)
if ($userCreditPoint->getUser() === $this) {
$userCreditPoint->setUser(null);
}
}
return $this;
}
/**
* @Groups({"Newsfeed:EL"})
*/
public function getAcademicTitleFull()
{
$ats = [];
foreach ($this->userAcademicTitles as $at) {
$ats[] = $at->getAcademicTitle()->getName();
}
return implode(" ", $ats);
}
public function getUserContainer(): ?Container
{
return $this->userContainer;
}
public function setUserContainer(?Container $userContainer): self
{
$this->userContainer = $userContainer;
if ($userContainer) {
$this->setUserContainerDomain($userContainer->getDomain());
}
return $this;
}
public function getUserContainerDomain(): ?string
{
return $this->userContainerDomain;
}
public function setUserContainerDomain(?string $userContainerDomain): self
{
$this->userContainerDomain = $userContainerDomain;
return $this;
}
/**
* @return Collection<int, EmailChanel>
*/
public function getUnsubscribedEmailChanels(): Collection
{
return $this->unsubscribedEmailChanels;
}
public function addUnsubscribedEmailChanel(EmailChanel $unsubscribedEmailChanel): self
{
if (!$this->unsubscribedEmailChanels->contains($unsubscribedEmailChanel)) {
$this->unsubscribedEmailChanels[] = $unsubscribedEmailChanel;
}
return $this;
}
public function removeUnsubscribedEmailChanel(EmailChanel $unsubscribedEmailChanel): self
{
$this->unsubscribedEmailChanels->removeElement($unsubscribedEmailChanel);
return $this;
}
public function getIsUnsubscribedInvite(): ?bool
{
return $this->isUnsubscribedInvite;
}
public function setIsUnsubscribedInvite(?bool $isUnsubscribedInvite): self
{
$this->isUnsubscribedInvite = $isUnsubscribedInvite;
return $this;
}
public function getIsEmailOff(): ?bool
{
return $this->isEmailOff;
}
public function setIsEmailOff(?bool $isEmailOff): self
{
$this->isEmailOff = $isEmailOff;
return $this;
}
public function getOrganization(): ?Company
{
return $this->organization;
}
public function setOrganization(?Company $organization): self
{
$this->organization = $organization;
return $this;
}
/**
* @return Collection<int, Company>
*/
public function getFollowingCompanies(): Collection
{
return $this->followingCompanies;
}
public function addFollowingCompany(Company $followingCompany): self
{
if (!$this->followingCompanies->contains($followingCompany)) {
$this->followingCompanies[] = $followingCompany;
}
return $this;
}
public function removeFollowingCompany(Company $followingCompany): self
{
$this->followingCompanies->removeElement($followingCompany);
return $this;
}
public function hasFollowingCompany(Company $followingCompany): bool
{
return $this->followingCompanies->contains($followingCompany);
}
/**
* @return Collection<int, Company>
*/
public function getOffCompanyNotifications(): Collection
{
return $this->offCompanyNotifications;
}
public function addOffCompanyNotification(Company $offCompanyNotification): self
{
if (!$this->offCompanyNotifications->contains($offCompanyNotification)) {
$this->offCompanyNotifications[] = $offCompanyNotification;
}
return $this;
}
public function removeOffCompanyNotification(Company $offCompanyNotification): self
{
$this->offCompanyNotifications->removeElement($offCompanyNotification);
return $this;
}
public function hasOffCompanyNotification(Company $offCompanyNotification): bool
{
return $this->offCompanyNotifications->contains($offCompanyNotification);
}
/**
* Get the value of companyId
*
* @return integer
*/
public function getCompanyId()
{
return $this->companyId;
}
/**
* Set the value of companyId
*
* @param integer $companyId
*
* @return self
*/
public function setCompanyId($companyId)
{
$this->companyId = $companyId;
return $this;
}
public function getImageUrl()
{
return $this->imageUrl;
}
public function setImageUrl($imageUrl)
{
$this->imageUrl = $imageUrl;
return $this;
}
/**
* @return Collection<int, Transaction>
*/
public function getTransactions(): Collection
{
return $this->transactions;
}
public function addTransaction(Transaction $transaction): self
{
if (!$this->transactions->contains($transaction)) {
$this->transactions[] = $transaction;
$transaction->setUser($this);
}
return $this;
}
public function removeTransaction(Transaction $transaction): self
{
if ($this->transactions->removeElement($transaction)) {
// set the owning side to null (unless already changed)
if ($transaction->getUser() === $this) {
$transaction->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, CommonCategory>
*/
public function getNewsfeedSubscriptions(): Collection
{
return $this->newsfeedSubscriptions;
}
public function addNewsfeedSubscription(CommonCategory $newsfeedSubscription): self
{
if (!$this->newsfeedSubscriptions->contains($newsfeedSubscription)) {
$this->newsfeedSubscriptions[] = $newsfeedSubscription;
}
return $this;
}
public function removeNewsfeedSubscription(CommonCategory $newsfeedSubscription): self
{
$this->newsfeedSubscriptions->removeElement($newsfeedSubscription);
return $this;
}
public function hasNewsfeedSubscription(CommonCategory $newsfeedSubscription): bool
{
return $this->newsfeedSubscriptions->contains($newsfeedSubscription);
}
public function getIsUpdateNewsfeedSubscriptions()
{
return $this->isUpdateNewsfeedSubscriptions;
}
public function setIsUpdateNewsfeedSubscriptions($isUpdateNewsfeedSubscriptions)
{
$this->isUpdateNewsfeedSubscriptions = $isUpdateNewsfeedSubscriptions;
return $this;
}
public function getNewsfeedSubscriptionId()
{
return $this->newsfeedSubscriptionId;
}
public function setNewsfeedSubscriptionId($newsfeedSubscriptionId)
{
$this->newsfeedSubscriptionId = $newsfeedSubscriptionId;
return $this;
}
/**
* @return Collection<int, Container>
*/
public function getNewsfeedContainerSubscriptions(): Collection
{
return $this->newsfeedContainerSubscriptions;
}
public function addNewsfeedContainerSubscription(Container $newsfeedContainerSubscription): self
{
if (!$this->newsfeedContainerSubscriptions->contains($newsfeedContainerSubscription)) {
$this->newsfeedContainerSubscriptions[] = $newsfeedContainerSubscription;
}
return $this;
}
public function removeNewsfeedContainerSubscription(Container $newsfeedContainerSubscription): self
{
$this->newsfeedContainerSubscriptions->removeElement($newsfeedContainerSubscription);
return $this;
}
public function hasNewsfeedContainerSubscription(Container $newsfeedContainerSubscription): bool
{
return $this->newsfeedContainerSubscriptions->contains($newsfeedContainerSubscription);
}
/**
* @return Collection<int, DocFileSaved>
*/
public function getDocFileSaveds(): Collection
{
return $this->docFileSaveds;
}
public function addDocFileSaved(DocFileSaved $docFileSaved): self
{
if (!$this->docFileSaveds->contains($docFileSaved)) {
$this->docFileSaveds[] = $docFileSaved;
$docFileSaved->setUser($this);
}
return $this;
}
public function removeDocFileSaved(DocFileSaved $docFileSaved): self
{
if ($this->docFileSaveds->removeElement($docFileSaved)) {
// set the owning side to null (unless already changed)
if ($docFileSaved->getUser() === $this) {
$docFileSaved->setUser(null);
}
}
return $this;
}
}