Membership Plug-in

4 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: March 8, 2010   (RSS)

Re: [Toledoh] Membership Plug-in

By Dave - March 8, 2010

Hi Tim,

Do you have some code like this to display login errors?
<?php if (@$errorsAndAlerts): ?>
<div style="color: #C00; font-weight: bold; font-size: 14px; font-family: arial;"><br/>
<?php echo $errorsAndAlerts; ?><br/>
</div>
<?php endif ?>


Next, you need a line like this to set them for the login form:
$errorsAndAlerts = alert();

You could try:

<?php if (!@$errorsAndAlerts) { $errorsAndAlerts = alert(); } ?>
<?php if (@$errorsAndAlerts): ?>
<div style="color: #C00; font-weight: bold; font-size: 14px; font-family: arial;"><br/>
<?php echo $errorsAndAlerts; ?><br/>
</div>
<?php endif ?>


Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Membership Plug-in

By Toledoh - March 8, 2010

That seems to work Dave... Brilliant!

Cheers,
Tim
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Membership Plug-in

By Toledoh - March 8, 2010

That's great Dave. I've now been able to get the "Edit Profile" component up and running also. I've just inlduced the
<?php

// prepopulate form with current user values
foreach ($CURRENT_USER as $name => $value) {
if (array_key_exists($name, $_REQUEST)) { continue; }
$_REQUEST[$name] = $value;
}


within the page iteself, rather than in the header. This way it's only displaying when the user is logged on.
Cheers,

Tim (toledoh.com.au)