• ray allen
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
I need finalizing this apex class to reset a password for the user and log the current user out of salesforce.  Here is my code any ideas I get this error message.
public class resetyourpassword {
  String user=userinfo.getuserId();
  system.resetPassword(user,true);
   PageReference demoPage = new pagereferenct('/secur/logout.jsp');
    demoPage.setRedirect(true);
}



I get an error unexpected token: ',' in line 3  where  system.resetPassword(user,true); id located
I need finalizing this apex class to reset a password for the user and log the current user out of salesforce.  Here is my code any ideas I get this error message.
public class resetyourpassword {
  String user=userinfo.getuserId();
  system.resetPassword(user,true);
   PageReference demoPage = new pagereferenct('/secur/logout.jsp');
    demoPage.setRedirect(true);
}



I get an error unexpected token: ',' in line 3  where  system.resetPassword(user,true); id located