public static function credentialsForUserWithRole($userRole) { $credentials = \Wordfence\ExKit\Config::get("user.{$userRole}", null, false); if ($credentials === null) { \Wordfence\ExKit\Cli::write("Please enter the username and password for a user with the \"{$userRole}\" role."); $username = \Wordfence\ExKit\Cli::prompt("Username", ''); $password = \Wordfence\ExKit\Cli::prompt("Password", ''); $credentials = [self::USER_CREDENTIALS_USERNAME_KEY => $username, self::USER_CREDENTIALS_PASSWORD_KEY => $password]; \Wordfence\ExKit\Config::set("user.{$userRole}", $credentials); } return $credentials; }