Fixing docs for auto_update and auto_create to be more clear about their
Jay Kuri [Wed, 23 Jan 2008 19:21:02 +0000 (19:21 +0000)]
behavior and possible gotchas

lib/Catalyst/Authentication/Store/DBIx/Class/User.pm

index dcc40ef..412ee9b 100644 (file)
@@ -257,13 +257,25 @@ Synonym for get_object
 
 =head2 auto_create
 
-This will delegate a call to the C<auto_create()> method of the resultset associated
+This is called when the auto_create_user option is turned on in 
+Catalyst::Plugin::Authenticate and a user matching the authinfo provided is not found. 
+By default, this will call the C<auto_create()> method of the resultset associated
 with this object. It is up to you to implement that method.
 
 =head2 auto_update
 
-This will delegate a call to the C<auto_create()> method of the current instance of the resultset
-associated with this object. It is up to you to implement that method.
+This is called when the auto_update_user option is turned on in
+Catalyst::Plugin::Authenticate. Note that by default the DBIx::Class store
+uses every field in the authinfo hash to match the user. This means any
+information that is provided that does not match the user record will cause
+the user record to not be found. In order for the auto_update routine to be
+useful, you have to add the fields you wish to update to the
+'ignore_fields_in_find' authinfo element, or you must be using one of the advanced row
+retrieval methods (searchargs or resultset).
+
+By default, auto_update will call the C<auto_update()> method of the
+DBIx::Class::Row object associated with the user. It is up to you to implement
+that method (probably in your schema file)
 
 =head1 BUGS AND LIMITATIONS