Support from Acquia helps fund testing for Drupal Acquia logo

Comments

umed91 created an issue. See original summary.

umed91’s picture

FileSize
1.48 KB

Attached patch will add a alter hook which can be used to alter the email verification text.

umed91’s picture

Status: Active » Needs review
colan’s picture

Status: Needs review » Needs work
+++ b/pki_ra.api.php
@@ -45,3 +45,17 @@ function hook_pki_ra_csr_data_alter(&$data) {
+ * Alters the email message sent for email verification

Missing a "." at the end.

+++ b/pki_ra.api.php
@@ -45,3 +45,17 @@ function hook_pki_ra_csr_data_alter(&$data) {
+ * @param $parameters

Missing variable type and a 2-space indented description on the next line. What's the structure of the variable? Developers need to know this.

+++ b/pki_ra.api.php
@@ -45,3 +45,17 @@ function hook_pki_ra_csr_data_alter(&$data) {
+ * @return array

Needs a blank line separating the @params and @return.

Also, a 2-space indented description is missing on the next line. I don't really feel a description adds much here, but it's the d.o coding standards.

+++ b/pki_ra.api.php
@@ -45,3 +45,17 @@ function hook_pki_ra_csr_data_alter(&$data) {
+  // Custom logic to change the verification link text for email verification.
+  // The verification link contains the registration ID as well as the token.
+  return $parameters;

Would be good to provide an example of setting $parameters here.

umed91’s picture

Code review changes are updated in the attached patch file and interdiff file is attached.

  • colan committed 843a516 on 8.x-1.x authored by umed91
    Issue #2946001 by umed91: Added hook to alter the e-mail verification...
colan’s picture

Status: Needs work » Fixed

Thanks, looks great.

colan’s picture

Status: Fixed » Needs review
FileSize
1.86 KB

Sorry I didn't catch this earlier, but the hook name should include the module ID so that's it's obvious what module is providing it, like we're doing with the other hooks here.

  • colan committed e47276e on 8.x-1.x
    Issue #2946001 by colan: Renamed hook to include module name.
    
colan’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.