From c5d17d3fd1bbdca95dd9230a2ab54f5aef04aef8 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Fri, 22 Jul 2011 09:48:47 -0400
Subject: [PATCH] Bugfixes in server list in vm server forms.

---
 interface/lib/classes/auth.inc.php |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/interface/lib/classes/auth.inc.php b/interface/lib/classes/auth.inc.php
index 450f25a..1002bd6 100644
--- a/interface/lib/classes/auth.inc.php
+++ b/interface/lib/classes/auth.inc.php
@@ -123,6 +123,15 @@
 			exit;
 		}
 	}
+	
+	public function get_random_password($length = 8) {
+		$base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+		$password = '';
+		for ($n=0;$n<$length;$n++) {
+			$password.=$base64_alphabet[mt_rand(0,63)];
+		}
+		return $password;
+	}
 		
 }
 

--
Gitblit v1.9.1