Skip to main content

system.kanoa.operators.addCrewMember(crewMemberInfo, userId)

Adds a user to a crew as of startDate. Does not automatically close any other open membership this user has on a different crew - call removeCrewMember first if they're moving crews.


Parameters

crewMemberInfo Dictionary

- crewIdInteger
- endDateStringoptional
- startDateString
- userIdIntegerthe sec.user being added to the crew

userId Integer: the actor performing this action (createdBy)


Returns

crewMemberId Integer the new membership's id on success, None on failure
message String None on success, an error message on failure


Example

crewMemberInfo = {'crewId': 5, 'userId': 3, 'startDate': system.date.now()}
userId = 12
rowsAffected, message = system.kanoa.operators.addCrewMember(sessionInfo, userId)