All Categories  Class Hierarchy  This Category  Previous  Indexes

User-exit Class CATVpmPEUsrMethod

CATVpmPEUsrMethod
 


public class CATVpmPEUsrMethod

People & Organization user-exit class.
Role: this class contains the various user-exits available for the People & Organization component. In order to execute custom code, one should modify the sample source file CATVpmPEUsrManager.cpp, and run the shell makeVX0PEUSR.sh to re-build the library VX0PEUSR.


Method Index


o ChangePassword(char*,char*,char*)
Validation of a password modification.
o ChangePasswordEnabled()
Password modification authorization.
o CheckLoggedUser(char*,char*&)
Control the login session.
o EndVpmSession()
Notification of the end of the session

Role: This method is called at the end of interactive applications (e.

o LoginVpmSession(char*,char*,char*,char*)
Control the login session.
o ValidatePassword(char*)
Validate password.
o ValidateUserId(char*)
Validate user ID.

Methods


o ChangePassword
public static int ChangePassword( const char* iUserID,
const char* iCurrentPasswd,
const char* iNewPasswd)
Validation of a password modification.

Role: This method is called when a user modifies his password via the P&O administration panel. Is thus possible invalidate the password modification, or to execute specific actions during that operation.

Parameters:
iUseRID
ID of the user the password of which is about to be modified.
iCurrentPasswd
Current password.
iNewPasswd
Password candidate.
Returns:
-1 when the original password is incorrect, 0 if a general failure occurred during the password change, 1 if the password modification was successful.
o ChangePasswordEnabled
public static int ChangePasswordEnabled()
Password modification authorization.

Role: This method is called to detemine whether user password can be modified via the P&O administration panel. Returns the following values: 0 if password modification is NOT permitted. 1 if password modification is permitted, but original password is NOT required. 2 if password modification is permitted, AND original password IS required.

o CheckLoggedUser
public static int CheckLoggedUser( const char* iPersonId,
char*& oMessage)
Control the login session.

Role: Use this method to control the user logged. This method is called at login time, once the end-user has provided a user/password validated by VPM database. If the method returns 0, the application will validate the session and the login process will continue normally. If the method returns 1, the application will invalidate the session, and the login process exit on error. If the method returns 2, a warning is shown to the user, once validated the application will validate the session, and the login process will continue normally.

Parameters:
iPersonId
VPM user ID.
oMessage
Error or warning message.
Returns:
0 if the session is accepted. 1 if the session is not accepted 2 if a warning should be shown to user
o EndVpmSession
public static void EndVpmSession()
Notification of the end of the session

Role: This method is called at the end of interactive applications (e.g. applications using the login panel).

o LoginVpmSession
public static int LoginVpmSession( const char* iUserID,
const char* iOrgID,
const char* iRoleName,
const char* iRoleOrgID)
Control the login session.

Role: Use this method to control, (in)validate the session that is being opened during the login process. This method is called at login time, once the end-user has provided a user/password and a role, right after VPM session is actually opened. If the method returns a value other than 0, the application will invalidate the session, and the login process exit on error.

Parameters:
iUSerID
VPM user ID.
iOrgID
ID of the organization the user is attached to.
iRoleName.
Login role name.
iRoleOrgID
Login role organization ID.
Returns:
0 if the session is accepted.
o ValidatePassword
public static int ValidatePassword( const char* iPassword)
Validate password.

Role: This method is called in various operations to validate the modification of a password.

Parameters:
iPassword
ID of the user the password of which is about to be modified.
Returns:
1 if validation is confirmed; the operation that triggered the call will be carried out by the application, 0 in case of general failure, -1 if the user ID is too short, -2 if the user ID is too long, -3 if a combination of alpha and numeric characters is required, -4 if user ID and password cannot be the same.
o ValidateUserId
public static int ValidateUserId( const char* iUserID)
Validate user ID.

Role: This method is called in various operations to validate the user being accessed. The supported operations are:

   password modification,
   batch login file creation.
 
Parameters:
iUserID
ID of the user the password of which is about to be modified.
Returns:
1 if validation is confirmed; the operation that triggered the call will be carried out by the application, 0 in case of general failure, -1 if the user ID is too short, -2 if the user ID is too long, -3 if a combination of alpha and numeric characters is required, -4 if user ID and password cannot be the same.

This object is included in the file: CATVpmPEUsrMethod.h
If needed, your Imakefile.mk should include the module: VX0PEUSR

Copyright © 2003, Dassault Systèmes. All rights reserved.