summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f595aae)
raw | patch | inline | side by side (parent: f595aae)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Dec 2007 14:32:11 +0000 (14:32 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Dec 2007 14:32:11 +0000 (14:32 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8062 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_multi_plug.inc | patch | blob | history | |
plugins/personal/generic/class_user.inc | patch | blob | history | |
plugins/personal/generic/generic.tpl | patch | blob | history |
index 81e92ca7ab7ffcc504fde55a4d1b6cbbae642f9c..0012b2710187343c5b123fd6e1009771c6590c41 100644 (file)
foreach($this->o_tab->by_object as $name => $obj){
$values = $this->o_tab->by_object[$name]->get_multi_edit_values();
- foreach($values as $a_name => $a_value){
- foreach($this->a_handles as $i_id => $o_handle){
+ foreach($this->a_handles as $i_id => $o_handle){
+ foreach($values as $a_name => $a_value){
$this->a_handles[$i_id]->by_object[$name]->$a_name = $a_value;
}
}
index d25bf8101d8eca6491a56d7d38a1e62790d5a2a0..6c1206736d806fc9225ef471d2fa2706fd2ca3a6 100644 (file)
if(!empty($this->personalTitle)){
$pt = $this->personalTitle." ";
}
- }
+ }
$this->cn= $pt.$this->givenName." ".$this->sn;
/* Permissions for that base? */
$this->set_acl_base($this->base);
}
- /* This checks will only be done, if we are not editing multiple objects
- */
- if(!$this->multiple_support_active){
-
- /* UID already used? */
- $ldap= $this->config->get_ldap_link();
- $ldap->cd($this->config->current['BASE']);
- $ldap->search("(uid=$this->uid)", array("uid"));
- $ldap->fetch();
- if ($ldap->count() != 0 && $this->dn == 'new'){
- $message[]= _("There's already a person with this 'Login' in the database.");
- }
-
- /* In template mode, the uid and givenName are autogenerated... */
- if (!$this->is_template){
- if ($this->sn == ""){
- $message[]= _("The required field 'Name' is not set.");
- }
- if ($this->givenName == ""){
- $message[]= _("The required field 'Given name' is not set.");
- }
- if ($this->uid == ""){
- $message[]= _("The required field 'Login' is not set.");
- }
- if (!(isset($this->config->current['DNMODE']) && $this->config->current['DNMODE'] == "uid")){
- $ldap->cat($this->new_dn);
- if ($ldap->count() != 0 && $this->dn != $this->new_dn && $this->dn == 'new'){
- $message[]= _("There's already a person with this 'Name'/'Given name' combination in the database.");
- }
- }
- }
+ /* UID already used? */
+ $ldap= $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(uid=$this->uid)", array("uid"));
+ $ldap->fetch();
+ if ($ldap->count() != 0 && $this->dn == 'new'){
+ $message[]= _("There's already a person with this 'Login' in the database.");
+ }
- /* Check for valid input */
- if ($this->is_modified && !is_uid($this->uid)){
- $message[]= _("The field 'Login' contains invalid characters. Lowercase, numbers and dashes are allowed.");
+ /* In template mode, the uid and givenName are autogenerated... */
+ if (!$this->is_template){
+ if ($this->sn == ""){
+ $message[]= _("The required field 'Name' is not set.");
}
- if (!is_url($this->labeledURI)){
- $message[]= _("The field 'Homepage' contains an invalid URL definition.");
+ if ($this->givenName == ""){
+ $message[]= _("The required field 'Given name' is not set.");
}
- if (preg_match ("/[\\\\]/", $this->sn)){
- $message[]= _("The field 'Name' contains invalid characters.");
+ if ($this->uid == ""){
+ $message[]= _("The required field 'Login' is not set.");
}
- if (preg_match ("/[\\\\]/", $this->givenName)){
- $message[]= _("The field 'Given name' contains invalid characters.");
+ if (!(isset($this->config->current['DNMODE']) && $this->config->current['DNMODE'] == "uid")){
+ $ldap->cat($this->new_dn);
+ if ($ldap->count() != 0 && $this->dn != $this->new_dn && $this->dn == 'new'){
+ $message[]= _("There's already a person with this 'Name'/'Given name' combination in the database.");
+ }
}
}
+ /* Check for valid input */
+ if ($this->is_modified && !is_uid($this->uid)){
+ $message[]= _("The field 'Login' contains invalid characters. Lowercase, numbers and dashes are allowed.");
+ }
+ if (!is_url($this->labeledURI)){
+ $message[]= _("The field 'Homepage' contains an invalid URL definition.");
+ }
+ if (preg_match ("/[\\\\]/", $this->sn)){
+ $message[]= _("The field 'Name' contains invalid characters.");
+ }
+ if (preg_match ("/[\\\\]/", $this->givenName)){
+ $message[]= _("The field 'Given name' contains invalid characters.");
+ }
+
/* Check phone numbers */
if (!is_phone_nr($this->telephoneNumber)){
$message[]= _("The field 'Phone' contains an invalid phone number.");
/* Check for reserved characers */
if (preg_match ('/[,+"?\'()=<>;]/', $this->givenName)){
$message[]= _("The field 'Given name' contains invalid characters.");
- }
- if (preg_match ('/[,+"?\'()=<>;]/', $this->sn)){
- $message[]= _("The field 'Name' contains invalid characters.");
- }
+ }
+ if (preg_match ('/[,+"?\'()=<>;]/', $this->sn)){
+ $message[]= _("The field 'Name' contains invalid characters.");
+ }
return $message;
}
$ldap = $this->config->get_ldap_link();
$ldap->cd ($this->dn);
$data = $ldap->get_attribute($this->dn,"jpegPhoto");
-
+
if((!$data) || ($data == "*removed*")){
/* In case we don't get an entry, load a default picture */
$ret['old_jpegPhoto'] = $this->old_jpegPhoto;
$ret['old_photoData'] = $this->old_photoData;
}
+ if(isset($ret['dateOfBirth'])){
+ unset($ret['dateOfBirth']);
+ }
$ret['is_modified'] = $this->is_modified;
+ $ret['base']=$this->base;
return($ret);
}
if (isset($_POST['pw_storage'])){
foreach(array("pw_storage") as $val){
if(isset($_POST[$val])){
- $data= validate($_POST[$val]);
+ $data= validate(get_post($val));
if ($data != $this->$val){
$this->is_modified= TRUE;
}
}
}
}
+ if(isset($_POST['base'])){
+ $this->base = get_post('base');
+ }
+ }
+
+ function multiple_check()
+ {
+ /* Call check() to set new_dn correctly ... */
+ $message = plugin::multiple_check();
+
+ echo "Checks missing";
+ return($message);
}
+
function multiple_execute()
index be60d8921813b4a427f24d59c8e4b9d07f7c46a9..cc13dcbd4d3654462f4d15cf4fa65f5b3e925413 100644 (file)
</td>
</tr>
- {if $is_template ne "true"}
+ {if $is_template ne "true" && !$multiple_support}
<tr>
<td><label for="edit_cert">{t}Certificates{/t}</label></td>
<td>