Mike Huntington wrote on Friday 30th of March 2012:subliminal, I'm using your Mongo Auth package and it is great. I am having one issue. When I use $auth->get_user_array(); It gives me the following error stack: ErrorException [ Notice ]: Undefined index: group
PKGPATH/mongoauth/classes/auth/login/mongoauth.php @ line 538 ErrorException [ Notice ]: Undefined index: additional_fields
PKGPATH/auth/classes/auth/login/driver.php @ line 110 ErrorException [ Warning ]: array_merge(): Argument #1 is not an array
PKGPATH/auth/classes/auth/login/driver.php @ line 110 ErrorException [ Warning ]: Invalid argument supplied for foreach()
PKGPATH/auth/classes/auth/login/driver.php @ line 111
Daniel Yovchev wrote on Monday 19th of March 2012:Thanks subliminal i remove serializes.
But how i can avoid two query when i use email and username because when i try to use $mongodb->where(array(
'username' => $username_or_email
))->or_where(array(
'email' => $username_or_email
))->get('users') i cannot get it work.
$mongodb ->where( array( 'username' => $username_or_email ), ->or_where( array( 'email' => $username_or_email ) ->get_one('users');
Daniel Yovchev wrote on Monday 19th of March 2012:No i don't get error just no results i try $query = $mongodb
->where(array(
'username' => $username_or_email
))
->or_where(array(
//'email' => $username_or_email
))
->get_one('users');
when i comment the email i get the user.
Then i try to comment the "//'username' => $username_or_email"
and uncomment the "email" and i get the user.
But when i try whit user and email i don't get results.
It looks like you're new here. If you want to get involved, click one of these buttons!