How to make an error come up when someone uses an already registered email

Hey,

I am wondering how I make an error come up if you enter an email that has already been used.

I am guessing you need to make a class with the $ symbol?

Conn

Also, if it is possible to do with this code here, could you please help me with it, since that is the code I guess I need to change

<dt>Email Address: *</dt>
<dd><input type="text" name="email" value="<?php echo Vars::POST('email');?>" />
 <?php
  if($email_error == true)
   echo '<p class="error">Please enter your email address</p>';
 ?>
</dd>

This feature is already in place and redirects the registrant to an error page with the email in use message.

In registration.php;

$ret = RegistrationData::CheckUserEmail($data['email']);

  if($ret)
  {
   $this->set('error', Lang::gs('email.inuse'));
   $this->render('registration_error.tpl');
   return false;
  }

Ahh, thanks