Author: allyb
Date: 2010-02-25 16:52:19 +0100 (Thu, 25 Feb 2010)
New Revision: 28291
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/model/sfEasyAuthUserBase.php
Log:
Deleting an object correctly deletes associated profiles
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/model/sfEasyAuthUserBase.php
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/model/sfEasyAuthUserBase.php
2010-02-25 15:12:34 UTC (rev 28290)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/model/sfEasyAuthUserBase.php
2010-02-25 15:52:19 UTC (rev 28291)
@@ -272,15 +272,14 @@
}
}
- // if we can delete this object, delete all profiles
- if ($return = parent::delete($con))
+ // delete this object and related all profiles
+ parent::delete($con);
+
+ foreach ($profileArray as $profile)
{
- foreach ($profileArray as $profile)
- {
- $profile->delete();
- }
+ $profile->delete();
}
-
+
// call an event after deleting the user
sfContext::getInstance()->getEventDispatcher()->notify(
new sfEvent(
@@ -288,8 +287,6 @@
'sf_easy_auth.post_delete'
)
);
-
- return $return;
}
/**
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.