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-plugins
Commits
54c45cbc
Commit
54c45cbc
authored
Dec 06, 2012
by
Benoit Mortier
Browse files
Fixes: #1660 Fatal error: Call to a member function cd() on a non-object in sambaAccount
parent
cdf87c4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
samba/personal/samba/class_sambaAccount.inc
View file @
54c45cbc
...
@@ -107,7 +107,7 @@ class sambaAccount extends plugin
...
@@ -107,7 +107,7 @@ class sambaAccount extends plugin
// Get samba domain and its sid/rid base
// Get samba domain and its sid/rid base
if
(
$this
->
sambaSID
!=
""
){
if
(
$this
->
sambaSID
!=
""
){
$this
->
SID
=
preg_replace
(
"/-[^-]+$/"
,
""
,
$this
->
sambaSID
);
$this
->
SID
=
preg_replace
(
"/-[^-]+$/"
,
""
,
$this
->
sambaSID
);
$ldap
=
$this
->
config
->
get_ldap_link
();
$ldap
=
$this
->
config
->
get_ldap_link
();
$ldap
->
cd
(
$this
->
config
->
current
[
'BASE'
]);
$ldap
->
cd
(
$this
->
config
->
current
[
'BASE'
]);
$ldap
->
search
(
"(&(objectClass=sambaDomain)(sambaSID=
$this->SID
))"
,
array
(
"sambaAlgorithmicRidBase"
,
"sambaDomainName"
));
$ldap
->
search
(
"(&(objectClass=sambaDomain)(sambaSID=
$this->SID
))"
,
array
(
"sambaAlgorithmicRidBase"
,
"sambaDomainName"
));
if
(
$ldap
->
count
()
!=
0
){
if
(
$ldap
->
count
()
!=
0
){
...
@@ -768,7 +768,7 @@ class sambaAccount extends plugin
...
@@ -768,7 +768,7 @@ class sambaAccount extends plugin
}
}
/* include global link_info */
/* include global link_info */
$ldap
=
$this
->
config
->
get_ldap_link
();
$ldap
=
$this
->
config
->
get_ldap_link
();
plugin
::
remove_from_parent
();
plugin
::
remove_from_parent
();
...
@@ -930,6 +930,8 @@ class sambaAccount extends plugin
...
@@ -930,6 +930,8 @@ class sambaAccount extends plugin
$this
->
uidNumber
=
$user
->
uidNumber
;
$this
->
uidNumber
=
$user
->
uidNumber
;
$this
->
gidNumber
=
$user
->
gidNumber
;
$this
->
gidNumber
=
$user
->
gidNumber
;
$ldap
=
$this
->
config
->
get_ldap_link
();
plugin
::
save
();
plugin
::
save
();
/* Remove objectClass for sambaIdmapEntry */
/* Remove objectClass for sambaIdmapEntry */
...
@@ -1051,7 +1053,6 @@ class sambaAccount extends plugin
...
@@ -1051,7 +1053,6 @@ class sambaAccount extends plugin
}
}
// Write back to ldap
// Write back to ldap
$ldap
=
$this
->
config
->
get_ldap_link
();
$ldap
->
cd
(
$this
->
dn
);
$ldap
->
cd
(
$this
->
dn
);
$this
->
cleanup
();
$this
->
cleanup
();
$ldap
->
modify
(
$this
->
attrs
);
$ldap
->
modify
(
$this
->
attrs
);
...
...
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