Cataly...::User(3pm)

πŸ“¦
version 0.1506 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

🌸 NAME 🌸

okay so bestie, this is Cataly...::User β€” the manual page for Catalyst::Authentication::Store::DBIx::Class::User, aka the backing user class for the Catalyst::Authentication::Store::DBIx::Class storage module. that's it, that's the whole vibe. it's the user class that does the storage stuff behind the scenes ✨


πŸ’« VERSION πŸ’«

this doc is talking about version 0.1506, so like, make sure that's the one you're on bestie 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so real talk: this is internal. you don't use it directly, no cap. go look at Catalyst::Authentication::Store::DBIx::Class for the actual how-to-use-this-module tea β˜•. and if you still need more than what's over there, the move is to read the source. that's the whole synopsis, it's giving mysterious πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

so Catalyst::Authentication::Store::DBIx::Class::User is the class that implements user storage β€” and it's hooked up to an underlying DBIx::Class schema object. that's the whole personality. user storage, DBIx::Class schema, connected. iconic πŸ’œ


⭐ SUBROUTINES / METHODS ⭐

buckle up bestie, here's the whole roster 🧚

🌈 new

it's the constructor. makes the thing. that's it, slay.

🌸 load ( $authinfo, $c )

grabs you a user out of storage using whatever info you handed it in $authinfo. retrieval era πŸ’«

πŸ¦‹ supported_features

tells you which features this class supports. and rn? that's Roles and Session. those two. periodt.

πŸ’… roles

hands back an array of roles that belong to this user β€” but only if roles are configured for this user class. no config, no roles, that's the deal πŸ™ˆ

πŸ“ for_session

returns a serialized user so it can be stashed in the session. packing it up for safekeeping πŸ“¦βœ¨

🧚 from_session

the reverse bestie β€” it revives a serialized user back out of the session storage. un-packs it. resurrection moment πŸ”₯

πŸ‘‘ get ( $fieldname )

gives you back the value of $fieldname for the user in question. roughly, this translates to a call to the DBIx::Class::Row's get_column( $fieldname ) routine. so like, close enough to that, iykyk πŸ’œ

⭐ get_object

fetches the DBIx::Class object that corresponds to this user. the actual object, in the flesh πŸ’–

🌈 obj (method)

it's just a synonym for get_object. same energy, different name, we love options 🫢

πŸ’€ auto_create

okay so this one fires when the auto_create_user option is turned on in Catalyst::Plugin::Authentication and no user matching the authinfo you provided can be found. by default, it calls the "auto_create()" method of the resultset that's associated with this object. and it is up to you to implement that method β€” she does not do it for you bestie, that's on you πŸ’…

πŸ”₯ auto_update

this gets called when the auto_update_user option is turned on in Catalyst::Plugin::Authentication.

⚠️ now pay attention because this part is important: by default, the DBIx::Class store uses every single field in the authinfo hash to match the user. which means any info you gave with the intent to update has to be ignored during the user search process. otherwise that info will most likely make the user record not be found at all. 😭

to ignore fields during the search, you have to add the fields you want to update to the 'ignore_fields_in_find' authinfo element. alternatively β€” and this is the fancy route β€” you can use one of the advanced row retrieval methods: searchargs or resultset. options on options, we love to see it ✨

by default, auto_update calls the "auto_update()" method of the DBIx::Class::Row object tied to the user. and again: it is up to you to implement that method (probably in your schema file, bestie). she's not gonna do it for you 🫢

🌸 AUTOLOAD

delegates method calls to the underlying user row. passing the baton πŸƒβ€β™€οΈπŸ’¨

πŸ’œ can

delegates handling of the "can" method to the underlying user row. same deal, different method name πŸŽ€


πŸ™ˆ BUGS AND LIMITATIONS πŸ™ˆ

literally none known right now ✨ but if you find any, please email the author. do your civic duty bestie 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Jason Kuri (jayk@cpan.org)


πŸ’– CONTRIBUTORS πŸ’–

  • Matt S Trout (mst) <mst@shadowcat.co.uk>

πŸ“œ LICENSE πŸ“œ

Copyright (c) 2007-2010 the aforementioned authors. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


and that's the whole page bestie πŸŽ€ this doc is for perl v5.34.0, dated 2022-06-09, and it's the Cataly...::User page β€” mwah, go forth and authenticate πŸ’…βœ¨

πŸ“¦ where this page comes from