Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Blond Jérémie
fusiondirectory
Commits
60fb40d0
Verified
Commit
60fb40d0
authored
7 months ago
by
dockx thibault
Browse files
Options
Download
Patches
Plain Diff
(CORE) - phpcs fixes
phpcs fixes
parent
173a0bdb
dev
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/simpleplugin/class_simplePlugin.inc
+10
-15
include/simpleplugin/class_simplePlugin.inc
with
10 additions
and
15 deletions
+10
-15
include/simpleplugin/class_simplePlugin.inc
+
10
−
15
View file @
60fb40d0
...
@@ -50,9 +50,9 @@ class simplePlugin implements SimpleTab
...
@@ -50,9 +50,9 @@ class simplePlugin implements SimpleTab
\sa simplePlugin::is_this_account()
\sa simplePlugin::is_this_account()
*/
*/
public
$is_account
=
FALSE
;
public
$is_account
=
FALSE
;
public
$initially_was_account
=
FALSE
;
public
$initially_was_account
=
FALSE
;
protected
$ignore_account
=
FALSE
;
protected
$ignore_account
=
FALSE
;
public
$acl_category
=
''
;
public
$acl_category
=
''
;
...
@@ -1465,7 +1465,8 @@ class simplePlugin implements SimpleTab
...
@@ -1465,7 +1465,8 @@ class simplePlugin implements SimpleTab
/* Propagate and log the event */
/* Propagate and log the event */
if
(
$this
->
initially_was_account
)
{
if
(
$this
->
initially_was_account
)
{
$errors
=
$this
->
handle_post_events
(
'modify'
,
[
'modifiedLdapAttrs'
=>
array_keys
(
$this
->
attrs
)]);
$errors
=
$this
->
handle_post_events
(
'modify'
,
[
'modifiedLdapAttrs'
=>
array_keys
(
$this
->
attrs
)]);
//logging::log('modify', 'plugin/'.get_class($this), $this->dn, array_keys($this->attrs), $this->ldap_error);
// We log values of attributes as well if modification occur in order for notification to be aware of the change. (Json allows array to string conversion).
logging
::
log
(
'modify'
,
'plugin/'
.
get_class
(
$this
),
$this
->
dn
,
[
json_encode
(
$this
->
attrs
)],
$this
->
ldap_error
);
logging
::
log
(
'modify'
,
'plugin/'
.
get_class
(
$this
),
$this
->
dn
,
[
json_encode
(
$this
->
attrs
)],
$this
->
ldap_error
);
}
else
{
}
else
{
$errors
=
$this
->
handle_post_events
(
'add'
,
[
'modifiedLdapAttrs'
=>
array_keys
(
$this
->
attrs
)]);
$errors
=
$this
->
handle_post_events
(
'add'
,
[
'modifiedLdapAttrs'
=>
array_keys
(
$this
->
attrs
)]);
...
@@ -1483,7 +1484,6 @@ class simplePlugin implements SimpleTab
...
@@ -1483,7 +1484,6 @@ class simplePlugin implements SimpleTab
*/
*/
protected
function
getAuditAttributesListFromConf
():
array
protected
function
getAuditAttributesListFromConf
():
array
{
{
global
$config
;
global
$config
;
$result
=
[];
$result
=
[];
...
@@ -1510,8 +1510,7 @@ class simplePlugin implements SimpleTab
...
@@ -1510,8 +1510,7 @@ class simplePlugin implements SimpleTab
*
*
* \param array $addAttrs
* \param array $addAttrs
*/
*/
protected
protected
function
handle_hooks
(
string
$when
,
string
$mode
,
array
$addAttrs
=
[]):
array
function
handle_hooks
(
string
$when
,
string
$mode
,
array
$addAttrs
=
[]):
array
{
{
switch
(
$mode
)
{
switch
(
$mode
)
{
case
'add'
:
case
'add'
:
...
@@ -1648,8 +1647,7 @@ class simplePlugin implements SimpleTab
...
@@ -1648,8 +1647,7 @@ class simplePlugin implements SimpleTab
/*! \brief This function protect the clear string password by replacing char.
/*! \brief This function protect the clear string password by replacing char.
*/
*/
protected
protected
static
function
passwordProtect
(
string
$hookCommand
=
NULL
):
string
static
function
passwordProtect
(
string
$hookCommand
=
NULL
):
string
{
{
if
(
isset
(
$_POST
[
"userPassword_password"
])
&&
!
empty
(
$_POST
[
"userPassword_password"
]))
{
if
(
isset
(
$_POST
[
"userPassword_password"
])
&&
!
empty
(
$_POST
[
"userPassword_password"
]))
{
if
(
strpos
(
$hookCommand
,
$_POST
[
"userPassword_password"
])
!==
FALSE
)
{
if
(
strpos
(
$hookCommand
,
$_POST
[
"userPassword_password"
])
!==
FALSE
)
{
...
@@ -2067,20 +2065,17 @@ class simplePlugin implements SimpleTab
...
@@ -2067,20 +2065,17 @@ class simplePlugin implements SimpleTab
$this
->
initially_was_account
=
FALSE
;
$this
->
initially_was_account
=
FALSE
;
}
}
protected
protected
function
attributeHaveChanged
(
string
$field
):
bool
function
attributeHaveChanged
(
string
$field
):
bool
{
{
return
$this
->
attributesAccess
[
$field
]
->
hasChanged
();
return
$this
->
attributesAccess
[
$field
]
->
hasChanged
();
}
}
protected
protected
function
attributeValue
(
string
$field
)
function
attributeValue
(
string
$field
)
{
{
return
$this
->
attributesAccess
[
$field
]
->
getValue
();
return
$this
->
attributesAccess
[
$field
]
->
getValue
();
}
}
protected
protected
function
attributeInitialValue
(
string
$field
)
function
attributeInitialValue
(
string
$field
)
{
{
return
$this
->
attributesAccess
[
$field
]
->
getInitialValue
();
return
$this
->
attributesAccess
[
$field
]
->
getInitialValue
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets