From 039ed1a1b07d4d2538305564e00841285a90e31c Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Mon, 21 Jul 2008 08:11:01 +0200 Subject: [PATCH] Sets email_directory to NULL when there's none. --- modules/profile/general.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/profile/general.inc.php b/modules/profile/general.inc.php index aa0fe1c..335a854 100644 --- a/modules/profile/general.inc.php +++ b/modules/profile/general.inc.php @@ -361,6 +361,9 @@ class ProfileGeneral extends ProfilePage if ($this->changed['email_directory']) { $new_email = ($this->values['email_directory'] == "new@new.new") ? $this->values['email_directory_new'] : $this->values['email_directory']; + if ($new_email == "") { + $new_email = NULL; + } XDB::execute("REPLACE INTO profile_directory (uid, email_directory) VALUES ({?}, {?})", S::v('uid'), $new_email); -- 2.1.4