You are here

public function Authentication::dbconnections_change_password in Auth0 Single Sign On 8.2

Send a change password email. This endpoint only works for database connections.

@link https://auth0.com/docs/api/authentication#change-password

Parameters

string $email Email for the user changing their password.:

string $connection The name of the database connection this user is in.:

null|string $password New password to use.: If this parameter is provided, when the user clicks on the confirm password change link, this value will be set for the user. If this parameter is NOT provided, the user will be asked for a new password.

Return value

mixed

File

vendor/auth0/auth0-php/src/API/Authentication.php, line 595

Class

Authentication
Class Authentication

Namespace

Auth0\SDK\API

Code

public function dbconnections_change_password($email, $connection, $password = null) {
  $data = [
    'client_id' => $this->client_id,
    'email' => $email,
    'connection' => $connection,
  ];
  if ($password !== null) {
    $data['password'] = $password;
  }
  return $this->apiClient
    ->method('post')
    ->addPath('dbconnections')
    ->addPath('change_password')
    ->withBody(json_encode($data))
    ->call();
}