Jump to content

Check User Password Via API


hostforweb

Recommended Posts

Hello,

 

 

after calling getclientdetails API, i receive back a response in xml format with password as value.

 

I would like to compare that hashed password with a password that customer entered on a login form.

 

I tried encryptpassword and decryptpassword API calls, but they don't seem to be doing what i expected them to do.

 

Please advise on how to check user password. I am integrating a number of system together, with WHMCS being the login gateway.

Link to comment
Share on other sites

A little copy-pasta how we do this:

			$password_whmcs = explode(":", $result['password']);
		$password_form	= md5($password_whmcs[1] . $password);

		if($password_whmcs[0] == $password_form)
			return true; // Right
		else
			return false; // Wrong

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated