diff --git a/gosa-core/setup/class_setupStep_Migrate.inc b/gosa-core/setup/class_setupStep_Migrate.inc
index 37dc7bef89dd9e0f263efc8679bbf81d8f6196e7..9de097644c1a9d0bb6c1eb4940a77f1c7b0346be 100644 (file)
{
var $languages = array();
var $attributes = array();
- var $header_image = "images/monitoring.png";
+ var $header_image = "images/setup/migrate.png";
var $checks = array();
/* Department migration attributes */
{
$pw1 = $pw2 = "";
$uid = "";
+
+ /* On first call check for rid/sid base */
+ $cv = $this->parent->captured_values;
+ $ldap_l = new LDAP($cv['admin'],
+ $cv['password'],
+ $cv['connection'],
+ FALSE,
+ $cv['tls']);
+
+ $ldap = new ldapMultiplexer($ldap_l);
if(isset($_POST['new_user_uid'])){
$uid = $_POST['new_user_uid'];
$pw2 = $_POST['new_user_password2'];
}
+
+ $ldap->cd($cv['base']);
+ $ldap->search("(uid=".$uid.")");
+ if($ldap->count()){
+ msg_dialog::display(_("Input error"),msgPool::duplicated(_("Uid")), ERROR_DIALOG);
+ return false;
+ }
+
if(empty($pw1) || empty($pw2) | ($pw1 != $pw2)){
msg_dialog::display(_("Password error"), _("Provided passwords do not match!"), ERROR_DIALOG);
return false;
msg_dialog::display(_("Input error"), _("Specify a valid user ID!"), ERROR_DIALOG);
return false;
}
-
- /* On first call check for rid/sid base */
- $cv = $this->parent->captured_values;
- $ldap_l = new LDAP($cv['admin'],
- $cv['password'],
- $cv['connection'],
- FALSE,
- $cv['tls']);
-
- $ldap = new ldapMultiplexer($ldap_l);
-
+
+
/* Get current base attributes */
$ldap->cd($cv['base']);