| @@ -309,14 +309,14 @@ | ||
| 309 | 309 | /** |
| 310 | 310 | * Generate a strong password with a mix of character types. |
| 311 | 311 | * |
| 312 | 312 | * @param string $password The password to be generated. |
| 313 | - * @param int $length The length of the password to be generated (12 or 24). | |
| 313 | + * @param int $length The length of the password to be generated (12). | |
| 314 | 314 | * |
| 315 | 315 | * @return string Strong password. |
| 316 | 316 | */ |
| 317 | 317 | public function generate_password( $password, $length ) { |
| 318 | - if ( ! in_array( $length, array( 12, 24 ), true ) ) { | |
| 318 | + if ( 12 !== $length ) { | |
| 319 | 319 | return $password; |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | $upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; |