src/AdminStore.php
private function _add_user_verify_email($email, $addname) {
		$logger = $this->logger;

		if (!self::verify_email_address($email)) {
			$logger->warning(sprintf(
				"Zapmin: usradd: email invalid: '%s' <- '%s'.",
				$addname, $email));
			return AdminStoreError::EMAIL_INVALID;
		}

		if ($this->store->query(
			"SELECT uid FROM udata WHERE email=? LIMIT 1",
			[$email])
		) {
			$logger->warning(sprintf(
				"Zapmin: usradd: email exists: '%s' <- '%s'.",
				$addname, $email));
			return AdminStoreError::EMAIL_EXISTS;
		}

		return 0;
	}
private function _add_user_verify_email($email, $addname) {
		$logger = $this->logger;

		if (!self::verify_email_address($email)) {
			$logger->warning(sprintf(
				"Zapmin: usradd: email invalid: '%s' <- '%s'.",
				$addname, $email));
			return AdminStoreError::EMAIL_INVALID;
		}

		if ($this->store->query(
			"SELECT uid FROM udata WHERE email=? LIMIT 1",
			[$email])
		) {
			$logger->warning(sprintf(
				"Zapmin: usradd: email exists: '%s' <- '%s'.",
				$addname, $email));
			return AdminStoreError::EMAIL_EXISTS;
		}

		return 0;
	}
private function _add_user_verify_email ( $ email , $ addname ) { $ logger = $ this -> logger ; if ( ! self :: verify_email_address ( $ email ) ) { $ logger -> warning ( sprintf ( "Zapmin: usradd: email invalid: '%s' <- '%s'." , $ addname , $ email ) ) ; return AdminStoreError :: EMAIL_INVALID ; } if ( $ this -> store -> query ( "SELECT uid FROM udata WHERE email=? LIMIT 1" , [ $ email ] ) ) { $ logger -> warning ( sprintf ( "Zapmin: usradd: email exists: '%s' <- '%s'." , $ addname , $ email ) ) ; return AdminStoreError :: EMAIL_EXISTS ; } return 0 ; }
Verify email of new user.
Verify email of new user .