summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 914ff58)
raw | patch | inline | side by side (parent: 914ff58)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 10 Dec 2007 09:35:05 +0000 (09:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 10 Dec 2007 09:35:05 +0000 (09:35 +0000) |
Still not working correctly ...
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8066 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8066 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 0012b2710187343c5b123fd6e1009771c6590c41..9a715179f0b3f5b427b9ef3d2df2fc726882ae14 100644 (file)
$values = $this->o_tab->by_object[$name]->get_multi_edit_values();
foreach($this->a_handles as $i_id => $o_handle){
foreach($values as $a_name => $a_value){
+ echo $a_name." -> ".$a_value."<br>";
$this->a_handles[$i_id]->by_object[$name]->$a_name = $a_value;
}
}
if($this->multiple_available() && is_array($this->a_handles)){
$this->populate_values();
foreach($this->a_handles as $i_id => $o_handle){
+ $o_handle->check();
$o_handle->save();
}
}
index 6c1206736d806fc9225ef471d2fa2706fd2ca3a6..fcbb57d114d00e5b456e981709cd2d3e10ae91d9 100644 (file)
}
$ldap->cd ($this->dn);
+ print_a(array("asdf"=>$this->attrs));
$ldap->$mode ($this->attrs);
if (show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/generic account with dn '%s' failed."),$this->dn))){
return (1);
/* Indicate whether a password change is needed or not */
function password_change_needed()
{
+ if($this->pw_storage == "{default}"){
+ return(FALSE);
+ }
return($this->pw_storage != $this->last_pw_storage);
}
if(isset($ret['dateOfBirth'])){
unset($ret['dateOfBirth']);
}
+ if(isset($ret['cn'])){
+ unset($ret['cn']);
+ }
$ret['is_modified'] = $this->is_modified;
$ret['base']=$this->base;
+
+ print_a($ret);
return($ret);
}
{
/* Call check() to set new_dn correctly ... */
$message = plugin::multiple_check();
-
- echo "Checks missing";
+
+
+
+ $pt= "";
+ if(isset($this->config->current['INCLUDE_PERSONAL_TITLE']) && preg_match("/true/i",$this->config->current['INCLUDE_PERSONAL_TITLE'])){
+ if(!empty($this->personalTitle)){
+ $pt = $this->personalTitle." ";
+ }
+ }
+ $this->cn= $pt.$this->givenName." ".$this->sn;
+
+ /* Permissions for that base? */
+ if (isset($this->config->current['DNMODE']) && $this->config->current['DNMODE'] == "uid"){
+ $this->new_dn= 'uid='.$this->uid.','.get_people_ou().$this->base;
+ } else {
+ if($this->orig_base == $this->base ){
+ $this->new_dn= $this->dn;
+ } else {
+ $this->new_dn= $this->create_unique_dn('cn', get_people_ou().$this->base);
+ }
+ }
+
+ /* Set the new acl base */
+ if($this->dn == "new") {
+ $this->set_acl_base($this->base);
+ }
+ if ($this->sn == ""){
+ $message[]= _("The required field 'Name' is not set.");
+ }
+ if ($this->givenName == ""){
+ $message[]= _("The required field 'Given name' is not set.");
+ }
+ if (!is_url($this->labeledURI) && $this->labeledURI != "{default}"){
+ $message[]= _("The field 'Homepage' contains an invalid URL definition.");
+ }
+ if (preg_match ("/[\\\\]/", $this->sn) && $this->sn != "{default}"){
+ $message[]= _("The field 'Name' contains invalid characters.");
+ }
+ if (preg_match ("/[\\\\]/", $this->givenName) && $this->givenName != "{default}"){
+ $message[]= _("The field 'Given name' contains invalid characters.");
+ }
+ if (!is_phone_nr($this->telephoneNumber) && $this->telephoneNumber != "{default}"){
+ $message[]= _("The field 'Phone' contains an invalid phone number.");
+ }
+ if (!is_phone_nr($this->facsimileTelephoneNumber) && $this->facsimileTelephoneNumber != "{default}"){
+ $message[]= _("The field 'Fax' contains an invalid phone number.");
+ }
+ if (!is_phone_nr($this->mobile) && $this->mobile != "{default}"){
+ $message[]= _("The field 'Mobile' contains an invalid phone number.");
+ }
+ if (!is_phone_nr($this->pager) && $this->pager != "{default}"){
+ $message[]= _("The field 'Pager' contains an invalid phone number.");
+ }
+ if (preg_match ('/[,+"?\'()=<>;]/', $this->givenName) && $this->givenName != "{default}"){
+ $message[]= _("The field 'Given name' contains invalid characters.");
+ }
+ if (preg_match ('/[,+"?\'()=<>;]/', $this->sn) && $this->sn != "{default}"){
+ $message[]= _("The field 'Name' contains invalid characters.");
+ }
return($message);
}
-
+
function multiple_execute()
index cc13dcbd4d3654462f4d15cf4fa65f5b3e925413..e1a4fde68e6dd674f6d598f8a9a206be4c523ed7 100644 (file)
{if $is_template ne "true"}
<tr>
<td><label for="sn">{t}Last name{/t}{$must}</label></td>
- <td>{render acl=$snACL}<input id="sn" name="sn" size=25 maxlength=60 value="{$sn}">{/render}</td>
+ <td>
+{if $multiple_support}
+ <input id="sn" name="dummy2" size=25 maxlength=60 value="{t}Multiple edit{/t}" disabled>
+{else}
+{render acl=$snACL}
+ <input id="sn" name="sn" size=25 maxlength=60 value="{$sn}">
+{/render}
+{/if}
+ </td>
</tr>
{else}
<tr>
{if $is_template ne "true"}
<tr>
<td><label for="givenName">{t}First name{/t}{$must}</label></td>
- <td>{render acl=$givenNameACL}<input id="givenName" name="givenName" size=25 maxlength=60 value="{$givenName}">{/render}</td>
+ <td>
+
+{if $multiple_support}
+ <input id="givenName" name="dummy3" size=25 maxlength=60 value="{t}Multiple edit{/t}" disabled>
+{else}
+{render acl=$givenNameACL}
+ <input id="givenName" name="givenName" size=25 maxlength=60 value="{$givenName}">
+{/render}
+{/if}
+ </td>
</tr>
<tr>
<td><label for="uid">{t}Login{/t}{$must}</label></td>