As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
In my app, I have a Forgot password functionality where user is requested to enter registered mobile number, SMS sent with code and then verified, then user will be required to enter the new password. Upon entering password and saving, I want the user row matching the username I have to be updated.
How can this be done?
Here is the code I am doing to get the username of the user after he entered his mobile number that matches the database and verifying it:
let q = KCSQuery(onField: "mobile", withExactMatchForValue: "\(self.userInstance.mobile!)")
let collection = KCSCollection.userCollection()
let store = KCSAppdataStore(collection: collection, options: nil)
store.queryWithQuery(q, withCompletionBlock: { (objectsOrNil: [AnyObject]!, error: NSError!) -> Void in
if(objectsOrNil.count == 0)
{
/*Error - Empty user list retreived*/
}else{
/*get username from objectsOrNil*/
let username = objectsOrNil[0].getValueForAttribute("username")
print("\(username!)")
}
}, withProgressBlock: nil)
Thanks in advance for the support
Best Answer
P
Pranav J
said
almost 7 years ago
Khalid,
I have few questions for you:
Is there an active user when this code is executed?
What error do you see?
Currently how are you sending the SMS?
In case there is no active user, the updation of the new password could be done through a custom endpoint which would take the necessary parameters. If there is an active user, this code looks good to me.
Thanks,
Pranav
Kinvey Support
1 Comment
P
Pranav J
said
almost 7 years ago
Answer
Khalid,
I have few questions for you:
Is there an active user when this code is executed?
What error do you see?
Currently how are you sending the SMS?
In case there is no active user, the updation of the new password could be done through a custom endpoint which would take the necessary parameters. If there is an active user, this code looks good to me.
khalid alghamdi
Hi,
In my app, I have a Forgot password functionality where user is requested to enter registered mobile number, SMS sent with code and then verified, then user will be required to enter the new password. Upon entering password and saving, I want the user row matching the username I have to be updated.
How can this be done?
Here is the code I am doing to get the username of the user after he entered his mobile number that matches the database and verifying it:
Thanks in advance for the support
Khalid,
I have few questions for you:
In case there is no active user, the updation of the new password could be done through a custom endpoint which would take the necessary parameters. If there is an active user, this code looks good to me.
Thanks,
Pranav
Kinvey Support
Pranav J
Khalid,
I have few questions for you:
In case there is no active user, the updation of the new password could be done through a custom endpoint which would take the necessary parameters. If there is an active user, this code looks good to me.
Thanks,
Pranav
Kinvey Support
1 person likes this
-
Why do I get "Undefined symbols" errors when building with KinveyKit?
-
How do I register push tokens?
-
When using social login, to perform a log-out, do I need to log out of the social network, Kinvey, o
-
How can I assign additional properties to users?
-
Does KinveyKit support 64-bit ARM devices, such as iPhone 5s?
-
Authorization Token Invalid or Expired
-
BOOL and how it is stored in the database.
-
Offline saving throwing errors
-
Custom endpoint not able to form request object
-
Security through business logic
See all 437 topics