UserPatchAttributes
final public class UserPatchAttributes
User attributes that can be updated using the patch()
method of Users
.
-
Creates a new
UserPatchAttributes
instance.Declaration
Swift
public init(dictionary: [String : Any] = [:])
Parameters
dictionary
Default attribute values.
-
Mark/unmark a user as blocked.
Declaration
Swift
public func blocked(_ blocked: Bool) -> UserPatchAttributes
Parameters
blocked
If the user is blocked.
Return Value
The same
UserPatchAttributes
instance to allow method chaining. -
Change the email of the user.
Declaration
Swift
public func email(_ email: String, verified: Bool? = nil, verify: Bool? = nil, connection: String, clientId: String) -> UserPatchAttributes
Parameters
email
New email for the user.
verified
If the email is verified.
verify
If the user should verify the email.
connection
Name of the connection.
clientId
Auth0 Client ID.
Return Value
The same
UserPatchAttributes
instance to allow method chaining. -
Set the verified status of the email.
Declaration
Swift
public func emailVerified(_ verified: Bool, connection: String) -> UserPatchAttributes
Parameters
verified
If the email is verified.
connection
Name of the connection.
Return Value
The same
UserPatchAttributes
instance to allow method chaining. -
Change the phone number of the user (SMS connection only).
Declaration
Swift
public func phoneNumber(_ phoneNumber: String, verified: Bool? = nil, verify: Bool? = nil, connection: String, clientId: String) -> UserPatchAttributes
Parameters
phoneNumber
New phone number for the user.
verified
If the phone number is verified.
verify
If the user should verify the phone number.
connection
Name of the connection.
clientId
Auth0 Client ID.
Return Value
The same
UserPatchAttributes
instance to allow method chaining. -
Set the verified status of the phone number.
Declaration
Swift
public func phoneVerified(_ verified: Bool, connection: String) -> UserPatchAttributes
Parameters
verified
If the phone number is verified or not.
connection
Name of the connection.
Return Value
The same
UserPatchAttributes
instance to allow method chaining. -
Change the user’s password.
Declaration
Swift
public func password(_ password: String, verify: Bool? = nil, connection: String) -> UserPatchAttributes
Parameters
password
New password for the user.
verify
If the password should be verified by the user.
connection
Name of the connection.
Return Value
The same
UserPatchAttributes
instance to allow method chaining. -
Change the username.
Declaration
Swift
public func username(_ username: String, connection: String) -> UserPatchAttributes
Parameters
username
New username for the user.
connection
Name of the connection.
Return Value
The same
UserPatchAttributes
instance to allow method chaining. -
Update user metadata.
Declaration
Swift
public func userMetadata(_ metadata: [String : Any]) -> UserPatchAttributes
Parameters
metadata
New user metadata values.
Return Value
The same
UserPatchAttributes
instance to allow method chaining. -
Update app metadata.
Declaration
Swift
public func appMetadata(_ metadata: [String : Any]) -> UserPatchAttributes
Parameters
metadata
New app metadata values.
Return Value
The same
UserPatchAttributes
instance to allow method chaining.