Skip to content

Commit 6c6d7db

Browse files
authored
Add email as option to UserManagement.update_user (#452)
1 parent ea0241c commit 6c6d7db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

workos/user_management.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ def update_user(
207207
self,
208208
*,
209209
user_id: str,
210+
email: Optional[str] = None,
210211
first_name: Optional[str] = None,
211212
last_name: Optional[str] = None,
212213
email_verified: Optional[bool] = None,
@@ -222,6 +223,7 @@ def update_user(
222223
user_id (str): The User unique identifier
223224
first_name (str): The user's first name. (Optional)
224225
last_name (str): The user's last name. (Optional)
226+
email (str): The user's email. (Optional)
225227
email_verified (bool): Whether the user's email address was previously verified. (Optional)
226228
password (str): The password to set for the user. (Optional)
227229
password_hash (str): The hashed password to set for the user, used when migrating from another user store. Mutually exclusive with password. (Optional)
@@ -949,6 +951,7 @@ def update_user(
949951
user_id: str,
950952
first_name: Optional[str] = None,
951953
last_name: Optional[str] = None,
954+
email: Optional[str] = None,
952955
email_verified: Optional[bool] = None,
953956
password: Optional[str] = None,
954957
password_hash: Optional[str] = None,
@@ -959,6 +962,7 @@ def update_user(
959962
json = {
960963
"first_name": first_name,
961964
"last_name": last_name,
965+
"email": email,
962966
"email_verified": email_verified,
963967
"password": password,
964968
"password_hash": password_hash,
@@ -1574,6 +1578,7 @@ async def update_user(
15741578
user_id: str,
15751579
first_name: Optional[str] = None,
15761580
last_name: Optional[str] = None,
1581+
email: Optional[str] = None,
15771582
email_verified: Optional[bool] = None,
15781583
password: Optional[str] = None,
15791584
password_hash: Optional[str] = None,
@@ -1584,6 +1589,7 @@ async def update_user(
15841589
json = {
15851590
"first_name": first_name,
15861591
"last_name": last_name,
1592+
"email": email,
15871593
"email_verified": email_verified,
15881594
"password": password,
15891595
"password_hash": password_hash,

0 commit comments

Comments
 (0)