make more oo-ey
[civicrm-core.git] / CRM / Utils / System / WordPress.php
index 26acbb1a8aa1a80d278ea5064bd13b889d8e0d51..d69c0fcc21af2c28f86f7e0806cd19d4f0af88c5 100644 (file)
@@ -1462,4 +1462,12 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base {
     add_action('profile_update', [$civicrm->users, 'update_user']);
   }
 
+  /**
+   * Depending on configuration, either let the admin enter the password
+   * when creating a user or let the user do it via email link.
+   */
+  public function showPasswordFieldWhenAdminCreatesUser() {
+    return !$this->isUserRegistrationPermitted();
+  }
+
 }