I’m having difficulty with this, the documentation says:
If its output is true, or an array where at least one index is set to true, then MODx will assume that the user has successfully logged in and bypass the default authentication via password.
ok - fine, but what happens if anything BUT true is returned? It seems that the event lets the user log in anyway, I’m trying to return a "false" output & the user is still getting logged in...
still lets the user login ...
so basically, how do I prevent a user from authenticating in a plugin using the onWebAuthentication event?
-sean
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
hmmm.... thanks Shaun.
though it’s not working [revo 2.1.1] ... the user is still getting logged in... I do get the email with all the correct variables...
here’s my little test case - pretty simple:
<?php
/*
$dbuser = $modx->config['username'];
$dbpass = $modx->config['password'];
$dbname = $modx->config['dbname'];
$dbdsn = $modx->config['dsn'];
*/
$uid = $user->get('id');
$username = $user->username;
$givenPassword = $scriptProperties['password'];
$uPassword = $user->password;
$returnUrl = $_POST['returnUrl'];
$content = 'prof password = ' . $uPassword .'<br />';
$content .= 'given password = ' . $givenPassword .'<br />';
$content .= 'returnUrl = ' . $returnUrl .'<br />';
mail('[email protected]','test variables',$content);
$modx->event->_output = false;
return;
-sean
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525