Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
t3o
my.typo3.org
Commits
6eff1dde
Commit
6eff1dde
authored
Jul 11, 2017
by
Stefan Busemann
Browse files
[TASK] Add namespace and password change hook
parent
bf0a6935
Pipeline
#1480
passed with stages
in 6 minutes and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
html/typo3conf/ext/t3omy/Classes/Hooks/FeManagerHooks.php
View file @
6eff1dde
<?php
namespace
T3o\T3omy\Hooks
;
/***************************************************************
* Copyright notice
*
* (c) 201
6
7 Stefan Busemann (in2code GmbH)
* (c) 2017 Stefan Busemann (in2code GmbH)
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
...
...
@@ -27,11 +28,11 @@
***************************************************************/
use
In2code\Femanager\Domain\Model\User
;
use
TYPO3\CMS\Core\Utility\GeneralUtility
;
use
T3o\T3oSlack\Controller\SlackUserController
;
/**
* Hook Functions for \
*/
class
Tx_T3omy_Hooks_FeUser
s
class
FeManagerHook
s
{
/**
*/
...
...
@@ -42,7 +43,8 @@ class Tx_T3omy_Hooks_FeUsers
*/
public
function
__construct
()
{
$this
->
ldap
=
new
Tx_T3oLdap_Utility_UserCreateUpdateDelete
();
// @todo make instance of ldap
#$this->ldap = new Tx_T3oLdap_Utility_UserCreateUpdateDelete();
}
/**
...
...
@@ -126,17 +128,17 @@ class Tx_T3omy_Hooks_FeUsers
* @param $_params
* @param bool
*/
public
function
writePassword
(
$_funcRef
,
$_params
,
$felogin
)
public
function
writePassword
(
$_funcRef
,
$_params
,
$felogin
=
false
)
{
\
TYPO3\CMS\Extbase\Utility\DebuggerUtility
::
var_dump
(
$_funcRef
,
'$_funcRef'
);
\
TYPO3\CMS\Extbase\Utility\DebuggerUtility
::
var_dump
(
$_params
,
'$_params'
);
\
TYPO3\CMS\Extbase\Utility\DebuggerUtility
::
var_dump
(
$felogin
,
'$felogin'
);
die
(
'halt'
);
$feUserUid
=
0
;
$userData
=
array
();
$feUserUid
=
$_funcRef
[
'user'
][
'uid'
];
$userData
=
$_funcRef
[
'user'
];
// set new password
$userData
[
'password'
]
=
$_funcRef
[
'newPasswordUnencrypted'
];
$createIfNotExists
=
false
;
// @todo add error handling
$result
=
$this
->
ldap
->
updateUser
(
$feUserUid
,
$userData
,
$createIfNotExists
);
}
}
Write
Preview
Markdown
is supported
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