Skip to content

Commit

Permalink
codestandards
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanheywood committed Aug 16, 2023
1 parent 4ef8889 commit 2e89ed1
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions classes/admin_setting_configpasswordhashed.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Hashed password formlib form element
*
* @package tool_emailutils
* @copyright 2018 onwards Catalyst IT {@link http://www.catalyst-eu.net/}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand All @@ -23,10 +25,15 @@

namespace tool_emailutils;


/**
* Hashed password formlib form element
*/
class admin_setting_configpasswordhashed extends \admin_setting {

/** @var Min length of password */
public $minlength;

/** @var Is the password hashed */
protected $ishashed;

/**
Expand All @@ -53,6 +60,10 @@ public function get_setting() {
return $this->config_read($this->name);
}

/**
* Writes the settings
* @param mixed $data data
*/
public function write_setting($data) {
// Is the password valid?
$isvalid = $this->validate($data);
Expand All @@ -72,7 +83,7 @@ public function write_setting($data) {

/**
* Validate data before storage
* @param string data
* @param string $data data
* @return mixed true if ok string if error found
*/
public function validate($data) {
Expand All @@ -85,6 +96,9 @@ public function validate($data) {

/**
* Return an XHTML string for the setting
*
* @param string $data data
* @param string $query
* @return string Returns an XHTML string
*/
public function output_html($data, $query = '') {
Expand Down

0 comments on commit 2e89ed1

Please sign in to comment.