Invite user
Here we create a new user and send them a invitation through mail.
- Python
- JavaScript
Create a new user:
user_email = 'artist@mail.vfx-company.com'
new_user = session.create(
'User', {
'username': user_email,
'email': user_email,
'is_active': True
}
)
session.commit()
Invite our new user:
new_user.send_invite()
Create a new user:
const userEmail = 'artist@mail.vfx-company.com';
const user = await session.create(
'User', {
'username': userEmail,
'email': userEmail,
'is_active': true
}
);
Invite our new user:
await session.call([
{
'action':'send_user_invite',
'user_id': user.data.id
}
])