Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
auth
Commits
169d85af
Commit
169d85af
authored
Feb 21, 2013
by
Bertrand Gauthier
Browse files
Ajout contrôleur Utilisateur (génération mot de passe sésame).
parent
33fde095
Changes
3
Hide whitespace changes
Inline
Side-by-side
config/module.config.php
View file @
169d85af
...
...
@@ -38,7 +38,7 @@ $zfcuserSettings = array(
* Accepted values: boolean true or false
*/
'enable_username'
=>
true
,
/**
/**
* Enable Display Name
* Enables a display name field on the registration form, which is persisted
* in the database. Default value is false.
...
...
@@ -61,6 +61,11 @@ $zfcuserSettings = array(
return
array
(
'zfcuser'
=>
$zfcuserSettings
,
'unicaen-auth'
=>
$settings
,
'controllers'
=>
array
(
'invokables'
=>
array
(
'unicaen-auth'
=>
'UnicaenAuth\Controller\UtilisateurController'
,
),
),
'view_manager'
=>
array
(
'template_path_stack'
=>
array
(
'unicaen-auth'
=>
__DIR__
.
'/../view'
,
...
...
src/UnicaenAuth/Controller/UtilisateurController.php
0 → 100644
View file @
169d85af
<?php
namespace
UnicaenAuth\Controller
;
use
Zend\Mvc\Controller\AbstractActionController
;
/**
*
*
* @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>
*/
class
UtilisateurController
extends
AbstractActionController
{
public
function
genererSesameAction
()
{
if
(
!
(
$password
=
$this
->
getRequest
()
->
getQuery
()
->
get
(
'mdp'
)))
{
return
$this
->
redirect
()
->
toRoute
(
'home'
);
}
$bcrypt
=
new
\
Zend\Crypt\Password\Bcrypt
();
return
array
(
'sesame'
=>
$bcrypt
->
create
(
$password
));
}
}
view/unicaen-auth/utilisateur/generer-sesame.phtml
0 → 100644
View file @
169d85af
<?php
$this
->
headTitle
(
"Générer un mot de passe"
);
?>
<?php
echo
$this
->
sesame
;
?>
\ No newline at end of file
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!
Cancel
Please
register
or
sign in
to comment