Author: allyb
Date: 2010-02-09 15:45:48 +0100 (Tue, 09 Feb 2010)
New Revision: 27784

Modified:
   plugins/sfEasyAuthPlugin/trunk/lib/model/sfEasyAuthUserBase.php
Log:
Extra credentials no longer have to refer to a class

Modified: plugins/sfEasyAuthPlugin/trunk/lib/model/sfEasyAuthUserBase.php
===================================================================
--- plugins/sfEasyAuthPlugin/trunk/lib/model/sfEasyAuthUserBase.php     
2010-02-09 13:04:51 UTC (rev 27783)
+++ plugins/sfEasyAuthPlugin/trunk/lib/model/sfEasyAuthUserBase.php     
2010-02-09 14:45:48 UTC (rev 27784)
@@ -56,12 +56,18 @@
         $className = 'sfEasyAuth' . ucfirst($className);
       }
 
-      // ignore credentials that end 'Local'
+      // add credentials to an array that don't end 'Local'
       if (!preg_match('/Local$/', $className))
       {
         $credentials[] = preg_replace('/^(.)/e', 'strtolower("$1")', 
str_replace('sfEasyAuth', '', $className));
       }
 
+      // if there is no class for the given credential, just return the array
+      if (!class_exists($className))
+      {
+        return $credentials;
+      }
+
       $userReflection = new ReflectionClass($className);
       $className = $userReflection->getParentClass()->getName();
     } while ($className !== $superClass);

-- 
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.

Reply via email to