Notifications
Clear all

User.Delete

7 Posts
2 Users
0 Reactions
735 Views
(@mazen)
Posts: 13
Eminent Member
Topic starter
 

Hi 

i need any example for the use of  User.Delete 

with or without password .

Thanks

 
Posted : 06/06/2016 2:56 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

In both cases you need to pass the password for security reason:

// By creating an instance of User
User myUser = new User();
myUser.userName = "Nickname";
myUser.password = "Password";
myUser.Delete ((bool success, string error) => {
   Debug.Log("Success: " + success + " -- Error: " + error);
});

// By local authenticated user
CombuManager.localUser.password = "Password";
CombuManager.localUser.Delete ((bool success, string error) => {
   Debug.Log("Success: " + success + " -- Error: " + error);
});

// By using static method
User.Delete ("Username", "Password", (bool success, string error) => {
   Debug.Log("Success: " + success + " -- Error: " + error);
});

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 06/06/2016 3:04 pm
(@mazen)
Posts: 13
Eminent Member
Topic starter
 

Success: False -- Error: Username or Password invalid
UnityEngine.Debug:Log(Object)

i tray more time with many user name & when i look at SQL i found the password is encrypted to (81dc9bdb52d04dc20036dbd8313ed055)  , i think this the error, so what the way to fix it?

 
Posted : 06/06/2016 4:02 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

Oh I see now, probably nobody used it recently.

Edit User.cs (static Delete, line 262):

form.AddField("Password", CombuManager.EncryptMD5(password));

This change will be added to the next update.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 06/06/2016 4:06 pm
(@mazen)
Posts: 13
Eminent Member
Topic starter
 

Success: False -- Error:
UnityEngine.Debug:Log(Object)

not working ,i think it's .php side 

 
Posted : 06/06/2016 4:37 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

I have no issues with the above change, are you running latest 2.1.7? Can you send as private message the URL and secret key to try myself?

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 06/06/2016 4:49 pm
(@mazen)
Posts: 13
Eminent Member
Topic starter
 

Success: True -- Error:
UnityEngine.Debug:Log(Object)

Ok its working fine now the line is 263

Thanks

 
Posted : 06/06/2016 4:53 pm
Share: