summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8f4ebf0)
raw | patch | inline | side by side (parent: 8f4ebf0)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 May 2007 09:36:07 +0000 (09:36 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 May 2007 09:36:07 +0000 (09:36 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6339 594d385d-05f5-0310-b6e9-bd551577e9d8
setup/class_setupStep_Migrate.inc | patch | blob | history | |
setup/setup_migrate.tpl | patch | blob | history |
index b75cb097f43c01d7c1877363e5a699a0452953bb..6d94881da11e3cbecb68e3af570cb53d28e0d878 100644 (file)
if($found){
$this->checks['acls']['STATUS'] = TRUE;
- $this->checks['acls']['STATUS_MSG']= _("Ok")." ";
+ $this->checks['acls']['STATUS_MSG']= _("Ok");
$this->checks['acls']['ERROR_MSG'] = "";
}else{
$this->checks['acls']['STATUS'] = FALSE;
function create_admin_user()
{
$pw1 = $pw2 = "";
-
+ $uid = "";
+
+ if(isset($_POST['new_user_uid'])){
+ $uid = $_POST['new_user_uid'];
+ }
if(isset($_POST['new_user_password'])){
$pw1 = $_POST['new_user_password'];
}
return false;
}
+ if(!is_uid($uid) || empty($uid)){
+ print_red(_("Please specify a valid uid."));
+ return false;
+ }
+
+
/* Establish ldap connection */
$cv = $this->parent->captured_values;
$ldap = new LDAP($cv['admin'],
if($cv['peopledn'] == "cn"){
$dn = "cn=System Administrator,".$cv['peopleou'].",".$cv['base'];
}else{
- $dn = "uid=admin,".$cv['peopleou'].",".$cv['base'];
+ $dn = "uid=".$uid.",".$cv['peopleou'].",".$cv['base'];
}
$methods = @passwordMethod::get_available_methods_if_not_loaded();
$new_user['givenName'] = "System";
$new_user['sn'] = "Administrator";
$new_user['cn'] = "System Administrator";
- $new_user['uid'] = "admin";
+ $new_user['uid'] = $uid;
$new_user['userPassword'] = $hash;
$ldap->cd($cv['base']);
if($this->acl_create_dialog){
$smarty = get_smarty();
+
+ $uid = "admin";
+ if(isset($_POST['new_user_uid'])){
+ $uid = $_POST['new_user_uid'];
+ }
+
+ $smarty->assign("new_user_uid",$uid);
$smarty->assign("new_user_password",@$_POST['new_user_password']);
$smarty->assign("new_user_password2",@$_POST['new_user_password2']);
$smarty->assign("method","create_acls");
index 5abb0b8a17f342a0ab000ad17e84e251f08f5f96..d281788bfd8b8c7b199aba49d99ebf8c50c1f03f 100644 (file)
--- a/setup/setup_migrate.tpl
+++ b/setup/setup_migrate.tpl
{t}User ID{/t}:
</td>
<td>
- <i>admin</i>
+ <input type='text' value='{$new_user_uid}' name='new_user_uid'><br>
</td>
</tr>
<tr>