Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory
Commits
ada3b288
Commit
ada3b288
authored
Apr 03, 2017
by
Côme Chilliet
Browse files
Added methods is simplePlugin to add/remove attributes post construct
Will be used by dnsHost and mailAccount for instance
parent
d3cdf82d
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/simpleplugin/class_simplePlugin.inc
View file @
ada3b288
...
...
@@ -503,6 +503,21 @@ class simplePlugin
return
$attr
.
'='
.
ldap_escape_dn
(
$this
->
attributesAccess
[
$attr
]
->
computeLdapValue
())
.
','
.
$ou
.
$base
;
}
protected
function
addAttribute
(
$section
,
$attr
)
{
$name
=
$attr
->
getLdapName
();
$this
->
attributesInfo
[
$section
][
'attrs'
][
$name
]
=
$attr
;
$this
->
attributesAccess
[
$name
]
=&
$this
->
attributesInfo
[
$section
][
'attrs'
][
$name
];
$this
->
attributesAccess
[
$name
]
->
setParent
(
$this
);
unset
(
$this
->
$name
);
}
protected
function
removeAttribute
(
$section
,
$id
)
{
unset
(
$this
->
attributesInfo
[
$section
][
'attrs'
][
$id
]);
unset
(
$this
->
attributesAccess
[
$id
]);
}
/*!
* \brief Returns a list of all available departments for this object.
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment