[Jifty-commit] r2950 - in jifty/trunk: lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Mar 12 17:26:09 EDT 2007
Author: jesse
Date: Mon Mar 12 17:26:08 2007
New Revision: 2950
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/CurrentUser.pm
Log:
r53370 at 108: jesse | 2007-03-12 17:25:41 -0400
* Only try to instantiate a user object when it looks like we have a model class of the right name
Modified: jifty/trunk/lib/Jifty/CurrentUser.pm
==============================================================================
--- jifty/trunk/lib/Jifty/CurrentUser.pm (original)
+++ jifty/trunk/lib/Jifty/CurrentUser.pm Mon Mar 12 17:26:08 2007
@@ -53,7 +53,8 @@
my $self = shift;
my %args = (@_);
- if (keys %args) {
+ if (keys %args and UNIVERSAL::can(Jifty->app_class('Model', 'User'), 'new') ) {
+
$self->user_object(Jifty->app_class('Model', 'User')->new(current_user => $self));
$self->user_object->load_by_cols(%args);
}
More information about the Jifty-commit
mailing list