Guest User

Untitled

a guest
Feb 19th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. public JSONObject passwordReset(String email){
  2.  
  3.  
  4. Node location_of_user_like=null;
  5. JSONObject json = new JSONObject();
  6. Node user = null;
  7. JDBCMySql jdbc=new JDBCMySql();
  8. try {
  9.  
  10. user=indexToNode("id", email);
  11. if(user==null){
  12.  
  13. json.put("status", "fail");
  14. json.put("desc", "You have not an acccount in ceylon eye.");
  15. return json;
  16.  
  17. }
  18.  
  19. String password=user.getProperty("password").toString();
  20. String text="Reset Password\n\n username:-"+email+"\npassword:-"+password+"";
  21. AdminOperations admin=new AdminOperations();
  22. admin.sendMessage(email, "Reset Password", text);
  23. json.put("status", "sucesses");
  24. json.put("desc", "password reset sucessfully.");
  25. }
  26. catch(Exception e){}
  27. return json;
  28. }
Add Comment
Please, Sign In to add comment