You are here

protected function CasUserManager::randomPassword in CAS 8

Same name and namespace in other branches
  1. 2.x 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 323

Class

CasUserManager
Class CasUserManager.

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);
}