You are here

protected function CasUserManager::randomPassword in CAS 2.x

Same name and namespace in other branches
  1. 8 src/Service/CasUserManager.php \Drupal\cas\Service\CasUserManager::randomPassword()

Generate a random password for new user registrations.

Return value

string A random password.

1 call to CasUserManager::randomPassword()
CasUserManager::register in src/Service/CasUserManager.php
Register a local Drupal user given a CAS username.

File

src/Service/CasUserManager.php, line 317

Class

CasUserManager
Provides the 'cas.user_manager' service default implementation.

Namespace

Drupal\cas\Service

Code

protected function randomPassword() {

  // Default length is 10, use a higher number that's harder to brute force.
  return \user_password(30);
}