Commit fcbb2177 authored by Nigel McNie's avatar Nigel McNie
Browse files

If, when creating an authinstance, we get passed an object, pretend it's a row...

If, when creating an authinstance, we get passed an object, pretend it's a row from the authinstance table.

I hate typing. Fixes the bug reported in this forum thread:
http://mahara.org/interaction/forum/topic.php?id=1111

Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
(cherry picked from commit 8b121283)
parent 9cff9e43
...@@ -1092,6 +1092,9 @@ class AuthFactory { ...@@ -1092,6 +1092,9 @@ class AuthFactory {
* instance doesn't exist (Should never happen) * instance doesn't exist (Should never happen)
*/ */
public static function create($id) { public static function create($id) {
if (is_object($id) && isset($id->id)) {
$id = $id->id;
}
if (isset(self::$authcache[$id]) && is_object(self::$authcache[$id])) { if (isset(self::$authcache[$id]) && is_object(self::$authcache[$id])) {
return self::$authcache[$id]; return self::$authcache[$id];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment