function fp_get_student_email

7.x db.inc fp_get_student_email($cwid)
6.x db.inc fp_get_student_email($cwid)
3 calls to fp_get_student_email()

File

includes/db.inc, line 686
This file contains mostly db shortcuts.

Code

function fp_get_student_email($cwid) {
  $email = db_result(db_query("SELECT email FROM users
                               WHERE cwid = ?                               
                               AND is_student = 1", array($cwid)));

  if (trim($email)) {
    return trim(strtolower($email));
  }

  // else, email wasn't set.
  return FALSE;

}