User Profile Service
This service provides methods to manipulate staff profiles in TimePunch.
CreateNewUserProfile
Using this method, you can create a new employee profile in TimePunch. This requires only a few details. As a result, the core permissions will be returned of the employee.
UserProfileRightsDto CreateNewUserProfile(
out TpFault fault,
TpAuthentication authentication,
string userName,
Guid? copyFromUserId,
Guid? teamId,
Guid? departmentId,
Guid? branchId,
string[] applicationKeys,
bool directLogon,
out List<string> permissions);
Needed Permission | --- | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication with proposed logon and password information | |
userName | Fore –and sure name of the user that shall be created | |
copyFromUserId | NULL, if no defaults shall be copied or a valid user id, if the e.g. the worktime settings shall be copied. | |
teamId | NULL, if the user shall not be added to an existing team – otherwise the Id of the existing team. | |
departmentId | NULL, if the user shall not be added to an existing department – otherwise the Id of the existing department. | |
branchId | NULL, if the user shall not be added to an existing branch – otherwise the Id of the existing branch. | |
applicationKeys | The applications for that the user shall be created. | |
directLogon | True, if the user shall be directly licensed. False, if the user shall only be created, but need not to be registered directly. | |
Permissions | Out | List that contains the permissions of the newly created user. |
return value | Object that contains the core user data and the permissions. |
InitializeUserProfiles
This method initialises an employee profile in TimePunch. The initialisation sets a new password for the employee, licences are assigned and, if no time entry exists yet, a new dummy time entry is created when the employee starts.
void InitializeUserProfiles(
out TpFault fault,
TpAuthentication authentication,
InitializeUserProfileDto initializeDto);
Needed Permission | userProfiles@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication with proposed logon and password information | |
initializeDto | The data object that contains the user profile ids, the license information and start date of the users to initialize |
DeleteUserProfileDataOlderThan
You can use this method to delete time data from existing user profiles. For this purpose, the delete method is given a period of years. Time data that is older than the specified number of years is deleted from the transferred profiles.
void DeleteUserProfileDataOlderThan(
out TpFault fault,
TpAuthentication authentication,
int olderThanYears,
Guid[] userIds);
Note: Only fully completed years are considered.
This means that if data older than 1 year is to be deleted in May 2018, the data will be deleted by 31.12.2016.
Needed Permission | dsgvo@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
olderThanYears | Specifies the amount of years to look back in time | |
userIds | User ids for that the data shall be deleted. |
DownloadProfileImages
This method loads the profile images of specified TimePunch profiles.
List<UserProfileImageDto> DownloadProfileImages(
out TpFault fault,
TpAuthentication authentication,
ImageFormat imageFormat,
Guid[] userIds);
Needed Permission | core@logon (if server logon is with username) | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
imageFormat | The image format (e.g. max size) the user profiles shall be returned. Valid values are: Thumbnail16, Thumbnail24, Thumbnail32, Thumbnail64, Thumbnail128, Thumbnail256, Thumbnail512, Portrait300X400, Portrait512X682, Portrait600X800, Portrait768X1024, Portrait900X1200 | |
Return value | List containing the profile images for the given profiles. |
ExportUserProfileData
This method exports the profile data of selected employees. The search is used for this purpose.
List<UserProfileDataDto> ExportUserProfileData(
out TpFault fault,
TpAuthentication authentication,
UserSearchDto search);
Needed Permission | userProfiles@export | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
UserSearchDto | The search object that is used to find the profiles to export. | |
Return value | List containing the profile data for the found profiles. |
ImportUserProfileData
This method imports the profile data of the passed-employees. The logon is crucial for the creation or update of the profiles.
List<UserProfileDataDto> ImportUserProfileData(
out TpFault fault,
TpAuthentication authentication,
List<UserProfileDataDto> userProfiles);
Needed Permission | userProfiles@import | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
userProfiles | List containing the profile data that shall be imported. | |
Return value | List containing the profile data that has been imported. |
LoadUserProfileDefaults
The method returns the default values for the specified employee profiles. Those values serve the internal logic of the calculation (flexible working hours / holidays) as offset or underlying.
List<UserProfileDefaultsDto> LoadUserProfileDefaults(
out TpFault fault,
TpAuthentication authentication,
Guid[] userIds);
Needed Permission | userProfiles@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
userIds | The user ids of the members from which the profile defaults shall be loaded | |
Return value | List with default profile information of the specified users. |
LoadUserProfileDetails
This method loads the detailed information about the employee profile.
List<UserProfileDetailsDto> LoadUserProfileDetails(
out TpFault fault,
TpAuthentication authentication,
Guid[] userIds);
Needed Permission | userProfiles@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
userIds | The user ids of the members from which the profile details shall be loaded | |
Return value | List with detailed profile information of the specified users. |
LoadUserProfileRights
This method loads the permissions of the specified employee profiles.
List<UserProfileRightsDto> LoadUserProfileRights(
out TpFault fault,
TpAuthentication authentication,
Guid[] userIds);
Needed Permission | permissions@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
userIds | The user ids of the members from which the permissions shall be loaded | |
Return value | List with profile permission information of the specified users. |
LoadUserProfileSensitive
This method loads relevant and sensitive employee data from the transferred employee profiles. The data can only be read out by users with the appropriate authorization and only if the employees are present in the user³s coverage.
List<UserProfileSensitiveDto> LoadUserProfileSensitive(
out TpFault fault,
TpAuthentication authentication,
Guid[] userIds)
Needed Permission | userSensitive@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
userIds | The user ids of the members from which the sensitive data shall be loaded | |
Return value | List with sensitive information of the specified users. |
SaveUserProfileDefaults
This method updates the default values for the specified employee profiles. This works only, if still no monthly closing has been done for the profiles. The SaveUserProfileDetails method must be used to update basic data.
List<UserProfileDefaultsDto> SaveUserProfileDefaults(
out TpFault fault,
TpAuthentication authentication,
List<UserProfileDefaultsDto> defaults);
Needed Permission | userProfiles@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
details | List containing the profile defaults that shall be updated. | |
Return value | List containing the profile defaults that has been updated. |
SaveUserProfileDetails
This method updates the profile information for one or more employees.
List<UserProfileDetailsDto> SaveUserProfileDetails(
out TpFault fault,
TpAuthentication authentication,
List<UserProfileDetailsDto> details);
Needed Permission | userProfiles@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
details | List containing the profile data that shall be updated. | |
Return value | List containing the profile data that has been updated. |
SaveUserProfileRights
This method updates the rights of the specified employee profiles. The SaveUserProfileDetails method must be used to update basic data.
List<UserProfileRightsDto> SaveUserProfileRights(
out TpFault fault,
TpAuthentication authentication,
List<UserProfileRightsDto> rights);
Needed Permission | permissions@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
details | List containing the profile rights that shall be updated. | |
Return value | List containing the profile rights that has been updated. |
SaveUserProfileSensitive
This method stores employee information relevant to data protection. The data can only be stored by users with appropriate authorization and only if the employees are present in the user's coverage.
List<UserProfileSensitiveDto> SaveUserProfileSensitive(
out TpFault fault,
TpAuthentication authentication,
List<UserProfileSensitiveDto> sensitive);
Needed Permission | userSensitive@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
sensitive | List containing the sensitive user data that shall be updated. | |
Return value | List containing the profile rights that has been updated. |
SearchUserProfilesToDelete
This method searches for user profiles that contain data that is older than the specified time in years. The profiles found can serve as a basis for the method DeleteUserProfileDataOlderThan.
List<UserDSGVOInfoDto> SearchUserProfilesToDelete(
out TpFault fault,
TpAuthentication authentication,
int olderThanYears,
UserSearchDto userSearchDto);
Needed Permission | dsgvo@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
olderThanYears | Specifies the amount of years to look back in time | |
userSearchDto | Search definition used to search the user profiles |
UploadProfileImage
This method updates the profile pictures for the given employee profiles.
void UploadProfileImage(
out TpFault fault,
TpAuthentication authentication,
UserProfileImageDto[] profileImages);
Needed Permission | userProfiles@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
profileImages | List containing the profile images that shall be updated. |