src/Utility/Random.php
public static function pronounceablePwd($length = 10) {
		srand((double)microtime() * 1000000);
		$password = '';
		$vowels = ['a', 'e', 'i', 'o', 'u'];
		$cons = ['b', 'c', 'd', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'r', 's', 't', 'u', 'v', 'w', 'tr',
							'cr', 'br', 'fr', 'th', 'dr', 'ch', 'ph', 'wr', 'st', 'sp', 'sw', 'pr', 'sl', 'cl'];
		for ($i = 0; $i < $length; $i++) {
			$password .= $cons[mt_rand(0, 31)] . $vowels[mt_rand(0, 4)];
		}
		return substr($password, 0, $length);
	}
public static function pronounceablePwd($length = 10) {
		srand((double)microtime() * 1000000);
		$password = '';
		$vowels = ['a', 'e', 'i', 'o', 'u'];
		$cons = ['b', 'c', 'd', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'r', 's', 't', 'u', 'v', 'w', 'tr',
							'cr', 'br', 'fr', 'th', 'dr', 'ch', 'ph', 'wr', 'st', 'sp', 'sw', 'pr', 'sl', 'cl'];
		for ($i = 0; $i < $length; $i++) {
			$password .= $cons[mt_rand(0, 31)] . $vowels[mt_rand(0, 4)];
		}
		return substr($password, 0, $length);
	}
public static function pronounceablePwd ( $ length = 10 ) { srand ( ( double ) microtime ( ) * 1000000 ) ; $ password = '' ; $ vowels = [ 'a' , 'e' , 'i' , 'o' , 'u' ] ; $ cons = [ 'b' , 'c' , 'd' , 'g' , 'h' , 'j' , 'k' , 'l' , 'm' , 'n' , 'p' , 'r' , 's' , 't' , 'u' , 'v' , 'w' , 'tr' , 'cr' , 'br' , 'fr' , 'th' , 'dr' , 'ch' , 'ph' , 'wr' , 'st' , 'sp' , 'sw' , 'pr' , 'sl' , 'cl' ] ; for ( $ i = 0 ; $ i < $ length ; $ i ++ ) { $ password .= $ cons [ mt_rand ( 0 , 31 ) ] . $ vowels [ mt_rand ( 0 , 4 ) ] ; } return substr ( $ password , 0 , $ length ) ; }
Generates a password

@param int $length Password length
@return string
@link https://github.com/CakeDC/users/blob/master/models/user.php#L498
Generates a password