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
3ea205b0
Commit
3ea205b0
authored
May 16, 2013
by
Bertrand Gauthier
Browse files
Correction problème : plantait si aucune base de données 'default' n'était définie.
parent
18052557
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/UnicaenAuth/Authentication/Adapter/Db.php
View file @
3ea205b0
...
...
@@ -2,6 +2,7 @@
namespace
UnicaenAuth\Authentication\Adapter
;
use
PDOException
;
use
Zend\ServiceManager\Exception\ServiceNotFoundException
;
use
UnicaenAuth\Options\ModuleOptions
;
use
Zend\ServiceManager\ServiceManager
;
use
Zend\ServiceManager\ServiceManagerAwareInterface
;
...
...
@@ -37,6 +38,9 @@ class Db extends \ZfcUser\Authentication\Adapter\Db implements ServiceManagerAwa
catch
(
PDOException
$e
)
{
return
false
;
}
catch
(
ServiceNotFoundException
$e
)
{
return
false
;
}
return
$result
;
}
...
...
src/UnicaenAuth/Authentication/Storage/Db.php
View file @
3ea205b0
...
...
@@ -2,6 +2,8 @@
namespace
UnicaenAuth\Authentication\Storage
;
use
PDOException
;
use
Zend\ServiceManager\Exception\ServiceNotFoundException
;
use
Zend\Authentication\Exception\InvalidArgumentException
;
/**
...
...
@@ -26,13 +28,17 @@ class Db extends \ZfcUser\Authentication\Storage\Db
try
{
$identity
=
parent
::
read
();
}
catch
(
\
PDOException
$pdoe
)
{
catch
(
PDOException
$pdoe
)
{
// throw new \UnicaenApp\Exception(
// "Erreur lors de la recherche de l'utilisateur $id dans la base de données : " . $pdoe->getMessage(),
// null,
// $pdoe);
$identity
=
null
;
}
catch
(
ServiceNotFoundException
$e
)
{
$identity
=
null
;
}
if
(
$identity
&&
!
is_scalar
(
$identity
))
{
return
$identity
;
}
...
...
@@ -50,6 +56,9 @@ class Db extends \ZfcUser\Authentication\Storage\Db
// $pdoe);
$identity
=
null
;
}
catch
(
ServiceNotFoundException
$e
)
{
$identity
=
null
;
}
}
if
(
$identity
)
{
...
...
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