Migrate from the old to the new user properties
Staffbase constantly improves its platform and features to maximize value for its users. As a part of such an improvement, Staffbase has introduced changes to its user model to make it less complex and easier to understand. Staffbase will soon replace some existing user properties with new ones.
The following properties will be removed:
enabled
enabled
pending
verificationCode
Currently, the user object contains, among others, the following properties:
With the removal of the properties enabled
and pending
from the response payload you can use the property status
to get the user’s current status on the platform.
Old Properties | New Properties |
---|---|
apiResponse.enabled && apiResponse.pending | apiResponse.status=pending |
apiResponse.enabled && !apiResponse.pending | apiResponse.status=activated |
!apiResponse.enabled && !apiResponse.pending | apiResponse.status=deactivated |
With the removal of the property verificationCode
from the response payload, you can use the properties secret
and emails
to get the necessary information.
Old Properties | New Properties |
---|---|
apiResponse.verificationCode.mail | apiResponse.emails[primary=true].value |
apiResponse.verificationCode.value | apiResponse.secret.plain |
With the removal of the property enabled
from the request payload you can use the property status
to reactivate or deactivate a user in the platform.
Currently, to deactivate a user, you would send a PUT request with {"enabled": false}
.
The new approach to deactivate a user is to send a PUT request with {"status": "deactivated"}
.
For more information, see the offboarding guide.