Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0dbcf683 authored by Ronak Patel's avatar Ronak Patel
Browse files

Merge branch 'dev/email-ldap' into 'main'

Set recoveryMailAddress attribute blank while creating account as it is not verified

See merge request !127
parents ad96b6e8 3d84c245
Loading
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -255,7 +255,7 @@ class UserService {
		if (!empty($recoveryEmail)) {
			$this->validateRecoveryEmail($recoveryEmail);
		}
		$this->addNewUserToLDAP($displayname, $recoveryEmail, $username, $userEmail, $password);
		$this->addNewUserToLDAP($displayname, $username, $userEmail, $password);
	}
	/**
	 * Validates the recovery email address.
@@ -302,7 +302,6 @@ class UserService {
	 * Add a new user to the LDAP directory.
	 *
	 * @param string $displayname The display name of the new user.
	 * @param string $recoveryEmail The recovery email address of the new user.
	 * @param string $username The username of the new user.
	 * @param string $userEmail The email address of the new user.
	 * @param string $password The password of the new user.
@@ -310,7 +309,7 @@ class UserService {
	 * @return void
	 * @throws LDAPUserCreationException If there is an error adding new entry to LDAP store
	 */
	private function addNewUserToLDAP(string $displayName, string $recoveryEmail, string $username, string $userEmail, string $password): void {
	private function addNewUserToLDAP(string $displayName, string $username, string $userEmail, string $password): void {
		$connection = $this->LDAPConnectionService->getLDAPConnection();
		$base = $this->LDAPConnectionService->getLDAPBaseUsers()[0];
		$newUserDN = "username=$username," . $base;
@@ -325,7 +324,7 @@ class UserService {
			'userPassword' => $password,
			'displayName' => $displayName,
			'quota' => $quota,
			'recoveryMailAddress' => $recoveryEmail,
			'recoveryMailAddress' => '',
			'active' => 'TRUE',
			'mailActive' => 'TRUE',
			'userClusterID' => $this->apiConfig['userCluserId'],