Author: allyb
Date: 2010-03-02 21:31:22 +0100 (Tue, 02 Mar 2010)
New Revision: 28352
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/config/app.yml
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/model/sfEasyAuthUserBase.php
Log:
Profiles are now correctly retrieved by doctrine. REMOVED profile_prefix
default.
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/config/app.yml
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/config/app.yml
2010-03-02 20:21:10 UTC (rev 28351)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/config/app.yml
2010-03-02 20:31:22 UTC (rev 28352)
@@ -5,7 +5,7 @@
# superAdmin: # credential, the user will gain all
those above it automatically
# It isn't necessary to define
credentials here for which there is no inheritance
- profile_prefix: Sb # Prefix for profile classes. Tables
used for profile
+ profile_prefix: '' # Prefix for profile classes. Tables
used for profile
# data will be formed by prepending
this prefix to
# schema_inheritance keys, with the
first character
# converted to uppercase, e.g.
SbBasicUser
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-03-02 20:21:10 UTC (rev 28351)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/model/sfEasyAuthUserBase.php
2010-03-02 20:31:22 UTC (rev 28352)
@@ -338,10 +338,11 @@
{
if ($profileClass = $this->computeProfileClassName($class))
{
+ // the propel peer class name
$peerClass = $profileClass . 'Peer';
// save the profile to the profiles array
- $this->profile[$class] = call_user_func(array($peerClass,
'retrieveByPk'), $profileId);
+ $this->profile[$class] =
Doctrine::getTable($profileClass)->find($profileId)/*&call_user_func(array($peerClass,
'retrieveByPk'),
$profileId)###Doctrine::getTable($profileClass)->find($profileId)&*/;
}
}
}
@@ -364,13 +365,6 @@
return false;
}
- // if we need to retrieve the default profile, just do it
-// @todo: delete this bit of code after migrating
- if (ucfirst($this->getType()) == $class)
- {
- return $this->getProfileId();
- }
-
// we need to pull out the ID from the extra credentials table
if ($credential =
Doctrine::getTable('sfEasyAuthUserCredential')->findOneByUserIdAndName/*&sfEasyAuthUserCredentialPeer::retrieveByUserIdAndName###Doctrine::getTable('sfEasyAuthUserCredential')->findOneByUserIdAndName&*/($this->getId(),
lcfirst($class)))
{
--
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.