Author: allyb
Date: 2010-02-20 19:33:31 +0100 (Sat, 20 Feb 2010)
New Revision: 28159
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/model/sfEasyAuthUserBase.php
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/user/sfEasyAuthSecurityUser.class.php
Log:
Created doctrine versions of all propel methods
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-20 18:17:19 UTC (rev 28158)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/model/sfEasyAuthUserBase.php
2010-02-20 18:33:31 UTC (rev 28159)
@@ -59,7 +59,7 @@
}
// get all credentials for the user
- foreach
(Doctrine::getTable('sfEasyAuthUserCredential')->findByUserId/*&sfEasyAuthUserCredentialPeer::retrieveByUserId###Doctrine::getTable('sfEasyAuthUserCredential')->findByUserId&*/($this->getId())
as $credential)
+ foreach
(Doctrine::getTable('sfEasyAuthUserCredential')->findOneByUserId/*&sfEasyAuthUserCredentialPeer::retrieveByUserId###Doctrine::getTable('sfEasyAuthUserCredential')->findOneByUserId&*/($this->getId())
as $credential)
{
$credentials[] = $credential->getCredential();
@@ -218,7 +218,7 @@
public function removeCredential($credential)
{
// note: related profiles aren't deleted, just orphaned
- if ($userCredential =
Doctrine::getTable('sfEasyAuthUserCredential')->findByUserIdAndName/*&sfEasyAuthUserCredentialPeer::retrieveByUserIdAndName###Doctrine::getTable('sfEasyAuthUserCredential')->findByUserIdAndName&*/($this->getId(),
$credential))
+ if ($userCredential =
Doctrine::getTable('sfEasyAuthUserCredential')->findOneByUserIdAndName/*&sfEasyAuthUserCredentialPeer::retrieveByUserIdAndName###Doctrine::getTable('sfEasyAuthUserCredential')->findOneByUserIdAndName&*/($this->getId(),
$credential))
{
$userCredential->delete();
}
@@ -259,7 +259,7 @@
$profileArray = array();
// get an array of profiles
- foreach
(Doctrine::getTable('sfEasyAuthUserCredential')->findByUserId/*&sfEasyAuthUserCredentialPeer::retrieveByUserId###Doctrine::getTable('sfEasyAuthUserCredential')->findByUserId&*/($this->getId())
as $credential)
+ foreach
(Doctrine::getTable('sfEasyAuthUserCredential')->findOneByUserId/*&sfEasyAuthUserCredentialPeer::retrieveByUserId###Doctrine::getTable('sfEasyAuthUserCredential')->findOneByUserId&*/($this->getId())
as $credential)
{
$method = self::getProfileGetter($credential->getCredential());
@@ -372,7 +372,7 @@
}
// we need to pull out the ID from the extra credentials table
- if ($credential =
Doctrine::getTable('sfEasyAuthUserCredential')->findByUserIdAndName/*&sfEasyAuthUserCredentialPeer::retrieveByUserIdAndName###Doctrine::getTable('sfEasyAuthUserCredential')->findByUserIdAndName&*/($this->getId(),
lcfirst($class)))
+ if ($credential =
Doctrine::getTable('sfEasyAuthUserCredential')->findOneByUserIdAndName/*&sfEasyAuthUserCredentialPeer::retrieveByUserIdAndName###Doctrine::getTable('sfEasyAuthUserCredential')->findOneByUserIdAndName&*/($this->getId(),
lcfirst($class)))
{
return $credential->getProfileId();
}
@@ -436,7 +436,7 @@
*/
public function setUserName($username)
{
- if ($eaUser =
Doctrine::getTable('sfEasyAuthUserCredential')->findByUserName/*&sfEasyAuthUserPeer::retrieveByUsername###Doctrine::getTable('sfEasyAuthUserCredential')->findByUserName&*/($username))
+ if ($eaUser =
Doctrine::getTable('sfEasyAuthUserCredential')->findOneByUserName/*&sfEasyAuthUserPeer::retrieveByUsername###Doctrine::getTable('sfEasyAuthUserCredential')->findOneByUserName&*/($username))
{
if ($eaUser->getId() !== $this->getId())
{
@@ -694,7 +694,7 @@
public function setCredentials(array $credentials)
{
// retrieve currently set credentials
- $credentialsToDelete =
Doctrine::getTable('sfEasyAuthUserCredential')->findByUserId/*&sfEasyAuthUserCredentialPeer::retrieveByUserId###Doctrine::getTable('sfEasyAuthUserCredential')->findByUserId&*/($this->getId());
+ $credentialsToDelete =
Doctrine::getTable('sfEasyAuthUserCredential')->findOneByUserId/*&sfEasyAuthUserCredentialPeer::retrieveByUserId###Doctrine::getTable('sfEasyAuthUserCredential')->findOneByUserId&*/($this->getId());
// remove credentials in the $credentials array from the
$credentialsToDelete array
for ($i=0; $i<count($credentials); $i++)
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/user/sfEasyAuthSecurityUser.class.php
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/user/sfEasyAuthSecurityUser.class.php
2010-02-20 18:17:19 UTC (rev 28158)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/user/sfEasyAuthSecurityUser.class.php
2010-02-20 18:33:31 UTC (rev 28159)
@@ -54,7 +54,7 @@
*/
public function authenticateAutoLogin($id, $hash)
{
- if ($eaUser = sfEasyAuthUserPeer::retrieveByIdAndAutoLoginHash($id, $hash))
+ if ($eaUser =
Doctrine::getTable('sfEasyAuthUser')->findOneByIdAndAutoLoginHash/*&sfEasyAuthUserPeer::retrieveByIdAndAutoLoginHash###Doctrine::getTable('sfEasyAuthUser')->findOneByIdAndAutoLoginHash&*/($id,
$hash))
{
// make sure their account is enabled. This allows them to log in via an
// auto log-in link even if their account has been suspended due to too
many
@@ -120,11 +120,11 @@
{
sfEasyAuthUtils::logDebug("Authenticating... Username: $username,
password: $password");
- $eaUser =
Doctrine::getTable('sfEasyAuthUser')->findByUsername/*&sfEasyAuthUserPeer::retrieveByUsername###Doctrine::getTable('sfEasyAuthUser')->findByUsername&*/($username);
+ $eaUser =
Doctrine::getTable('sfEasyAuthUser')->findOneByUsername/*&sfEasyAuthUserPeer::retrieveByUsername###Doctrine::getTable('sfEasyAuthUser')->findOneByUsername&*/($username);
if (!$eaUser &&
sfConfig::get('app_sf_easy_auth_allow_emails_as_usernames_for_login'))
{
- $eaUser =
Doctrine::getTable('sfEasyAuthUser')->findByEmail/*&sfEasyAuthUserPeer::retrieveByEmail###Doctrine::getTable('sfEasyAuthUser')->findByEmail&*/($username);
+ $eaUser =
Doctrine::getTable('sfEasyAuthUser')->findOneByEmail/*&sfEasyAuthUserPeer::retrieveByEmail###Doctrine::getTable('sfEasyAuthUser')->findOneByEmail&*/($username);
}
if (is_object($eaUser))
--
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.