SilverStripe 2.4 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
Version: master
  • master
  • 3.1
  • 3.0
  • 2.4
  • tagfield

Packages

  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • publishers
    • reports
    • security
    • tasks
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • installer
  • None
  • PHP
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets

Classes

  • Authenticator
  • BasicAuth
  • ChangePasswordForm
  • Group
  • GroupCsvBulkLoader
  • LoginAttempt
  • LoginForm
  • Member
  • Member_ChangePasswordEmail
  • Member_DatetimeOptionsetField
  • Member_ForgotPasswordEmail
  • Member_GroupSet
  • Member_ProfileForm
  • Member_SignupEmail
  • Member_Validator
  • MemberAuthenticator
  • MemberCsvBulkLoader
  • MemberLoginForm
  • MemberPassword
  • NullSecurityToken
  • NZGovtPasswordValidator
  • PasswordEncryptor
  • PasswordEncryptor_LegacyPHPHash
  • PasswordEncryptor_MySQLOldPassword
  • PasswordEncryptor_MySQLPassword
  • PasswordEncryptor_None
  • PasswordEncryptor_PHPHash
  • PasswordValidator
  • Permission
  • Permission_Group
  • PermissionCheckboxSetField
  • PermissionCheckboxSetField_Readonly
  • PermissionRole
  • PermissionRoleCode
  • RandomGenerator
  • Security
  • SecurityToken

Interfaces

  • PermissionProvider

Exceptions

  • PasswordEncryptor_NotFoundException

Class PasswordValidator

This class represents a validator for member passwords.

$pwdVal = new PasswordValidator();
$pwdValidator->minLength(7);
$pwdValidator->checkHistoricalPasswords(6);
$pwdValidator->characterStrength('lowercase','uppercase','digits','punctuation');

Member::set_password_validator($pwdValidator);
Object
Extended by PasswordValidator

Direct known subclasses

NZGovtPasswordValidator

Package: sapphire\security
Located at sapphire/security/PasswordValidator.php

Methods summary

public
# minLength( mixed $minLength )

Minimum password length

Minimum password length

public
# characterStrength( mixed $minScore, mixed $testNames )

Check the character strength of the password.

Check the character strength of the password.

Eg: $this->characterStrength(3, array("lowercase", "uppercase", "digits", "punctuation"))

Parameters

$minScore
mixed
$minScore The minimum number of character tests that must pass
$testNames
mixed
$testNames The names of the tests to perform
public
# checkHistoricalPasswords( mixed $count )

Check a number of previous passwords that the user has used, and don't let them change to that.

Check a number of previous passwords that the user has used, and don't let them change to that.

public ValidationResult
# validate( String $password, Member $member )

Parameters

$password
String
$password
$member
Member
$member

Returns

ValidationResult

Methods inherited from Object

__call(), __construct(), __toString(), addMethodsFrom(), addStaticVars(), addWrapperMethod(), add_extension(), add_static_var(), allMethodNames(), cacheToFile(), cacheToFileWithArgs(), clearCache(), combined_static(), create(), createMethod(), create_from_string(), defineMethods(), exists(), extInstance(), extend(), getCustomClass(), getExtensionInstance(), getExtensionInstances(), get_extensions(), get_static(), hasExtension(), hasMethod(), has_extension(), invokeWithExtensions(), is_a(), loadCache(), parentClass(), parse_class_spec(), remove_extension(), sanitiseCachename(), saveCache(), set_stat(), set_static(), set_uninherited(), stat(), strong_create(), uninherited(), uninherited_static(), useCustomClass()

Magic methods summary

Properties summary

public static array $character_strength_tests
#
protected mixed $minLength
#
protected mixed $minScore
#
protected mixed $testNames
#
protected mixed $historicalPasswordCount
#

Properties inherited from Object

$class, $extension_instances, $extensions

Comments

Comment policy: Please use comments for tips and corrections about the described functionality. Comments are moderated, we reserve the right to remove comments that are inappropriate or are no longer relevant.
Use the Silverstripe Forum to ask questions.
blog comments powered by Disqus
SilverStripe 2.4 API Docs API documentation generated by ApiGen 2.8.0