
gkornbluth
Veteran
May 23, 2010, 8:25 AM
Post #1 of 18
(9306 views)
Shortcut
|
|
Testing for existing user account
|
Can't Post
|
|
Hi all, Using the membership plugin, I’d like to be able to test for the existence of a disabled member account based on an email address entered in a form, and display a message on the web page confirming the existence of the account. Here’s what I’ve done so far (mostly guesswork, mostly wrong!). Which gives me this error when I try to display any page that uses the membership plugin:
Parse error: syntax error, unexpected $end in /hsphere/local/home/apbcweb/artistsofpalmbeachcounty.org/cmsAdmin/plugins/websiteMembership.php on line 270 To the “// perform website login actions” section in the membership plugin, I added the lineif (@$_REQUEST['action'] == 'pastInformation') { _websiteLogin_pastInformation(); } Then above the existing: function _websiteLogin_sendPasswordReminder() { global $SETTINGS, $TABLE_PREFIX; I added;function _websiteLogin_pastInformation() { global $SETTINGS, $TABLE_PREFIX; // REQUEST FOR PAST INFORMATION // display errors if (array_key_exists('pastInformation', $_REQUEST) && @$_REQUEST['pastInformation'] == $user['email']) { alert("<span class='heading-text-yellow'>Congratulations!!!<br />Your Account Exists</span><br/><span class='body-text-yellow'>You do not need to create a new account.</span>\n"); } The plan was then to use this form (modified from the password reminder code) to request the test, but I never even got that far (so this is probably wrong too). <?php if (!@$CURRENT_USER): ?> <form action="?" method="post"> <input type="hidden" name="action" value="pastInformation" /> <span class="body-text-bold">Enter your e-mail address:</span> <input type="text" name="pastInformation" value="<?php echo htmlspecialchars(@$_REQUEST['pastInformation']) ?>" size="20" /> <input type="submit" name="submit" value="Submit" /> </form> <?php endif ?> I've attached the website membership plugin that I've worked on and could use some insight as to where I’m going wrong. Thanks, Jerry Kornbluth
(This post was edited by gkornbluth on May 23, 2010, 8:31 AM)
|