For our password reminder (Login Add-On) we need users to enter both their:
username AND email-adress
For security reasons we need users to enter them both. Obviously username and e-mailadres should match a single user en send this user his or her password-rest email.
Tried to write a snippet to find a user by his/her email-adres AND his/her username, but this doesn't seem to work.
$user1 = $modx->getObject('modUser',array('username' => 'username1'));
$user2 = $modx->getObject('modUser',array('email' => '[email protected]')); <-- this doesn't work...
if ( $user1->get('id') == $user2->get('id') ) {
okay!;
}
Anyone got suggestions?