Fix: 2 bugs during validation of a member

This commit is contained in:
Laurent Destailleur
2013-11-26 13:04:15 +01:00
parent 18ed9d5ca7
commit 0383dc4706
2 changed files with 2 additions and 2 deletions

View File

@@ -1344,7 +1344,7 @@ class Adherent extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
$sql.= " statut = 1";
$sql.= ", datevalid = ".$this->db->idate($now);
$sql.= ", datevalid = '".$this->db->idate($now)."'";
$sql.= ", fk_user_valid=".$user->id;
$sql.= " WHERE rowid = ".$this->id;

View File

@@ -183,7 +183,7 @@ class InterfaceMailmanSpipsynchro
// Add user into some linked tools (mailman, spip, etc...)
if (($object->oldcopy->email != $object->email) || ($object->oldcopy->typeid != $object->typeid)) // TODO Do del/add also if type change
{
if ($object->oldcopy->email != $object->email) // If email has changed we delete mailman subscription for old email
if (is_object($object->oldcopy) && ($object->oldcopy->email != $object->email)) // If email has changed we delete mailman subscription for old email
{
if ($object->oldcopy->del_to_abo() < 0)
{