From: Stéphane Jacob Date: Mon, 21 Jul 2008 06:11:01 +0000 (+0200) Subject: Sets email_directory to NULL when there's none. X-Git-Tag: xorg/1.0.0~332^2~550^2~2 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=039ed1a1b07d4d2538305564e00841285a90e31c;p=platal.git Sets email_directory to NULL when there's none. --- 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);