Remove User¶
Description¶
This operation deletes a specific user from the Users
data table.
Method¶
The signature presented below expects the "objectId"
to delete a user record from the data table. The "objectId"
property is a unique identifier assigned by Backendless to the user account. You can also pass the BackendlessUser
object containing the objectId
to delete a record.
[[Backendless.shared.data ofTable:@"Users"] removeByIdWithObjectId:(NSString *)objectId responseHandler:^(NSInteger)responseHandler errorHandler:^(Fault *)errorHandler];
Backendless.shared.data.ofTable("Users").removeById(objectId: String, responseHandler: ((Int) -> Void)!, errorHandler: ((Fault) -> Void)!)
where:
Argument | Description |
---|---|
objectId |
Unique identifier of a user record that must be deleted from the Users data table. String value or number. Refer to the Data Import topic to learn more about objectId value as the number. |
responseHandler |
Handles successful result of an asynchronous call. |
errorHandler |
Handles fault result of an asynchronous call. |
Return Value¶
The object containing a timestamp when the Backendless server has removed the object from the data store.
Example¶
The example below deletes the user record associated with the following objectId: "4D584E4D-05A3-4AC4-90C7-B80D1584E7AD"
.
[[Backendless.shared.data ofTable:@"Users"] removeByIdWithObjectId:@"4D584E4D-05A3-4AC4-90C7-B80D1584E7AD" responseHandler:^(NSInteger response) {
// handle response
} errorHandler:^(Fault *fault) {
// handle error
}];
Backendless.shared.data.ofTable("Users").removeById(objectId: "4D584E4D-05A3-4AC4-90C7-B80D1584E7AD", responseHandler: { response in
// handle response
}, errorHandler: { fault in
// handle error
})
Codeless Reference¶
where:
Argument | Description |
---|---|
objectId |
Unique identifier of a user record that must be deleted from the Users data table. |
Returns the timestamp when the Backendless server has removed the object from the data store.
Consider the following record in the Users
data table:
The example below removes the user "alice@yourmail.com"
associated with the objectId: "4D584E4D-05A3-4AC4-90C7-B80D1584E7AD"
.
The output will look as shown below after the Codeless logic runs: