Re: [Catalyst] Format last modified date field ...

2009-12-28 Thread J. Shirley
On Mon, Dec 28, 2009 at 1:17 PM, Kiffin Gish wrote: > I'm using a last_modified field which is being displayed like this > "2009-12-28T18:25:28" (what's that 'T' doing in there?) but want to use > a different format, how? > > In the list.tt2 file for listing users, I have: > > [% WHILE (user = use

Re: [Catalyst] Format last modified date field ...

2009-12-28 Thread Ian Docherty
Kiffin It looks to me like when you print the date field it is doing stringification of the DateTime object. Try doing user.last_modified.ymd In your template and see what you get. If you get something like '2009-12-28' then you can output any of the formats that DateTime supports. Regards

[Catalyst] Format last modified date field ...

2009-12-28 Thread Kiffin Gish
I'm using a last_modified field which is being displayed like this "2009-12-28T18:25:28" (what's that 'T' doing in there?) but want to use a different format, how? In the list.tt2 file for listing users, I have: [% WHILE (user = users_rs.next) -%] [% FOREACH col IN users_rs.result_source.column

Re: [Catalyst] C::P::Authentication, force user authentication

2009-12-28 Thread David Schmidt
On Mon, Dec 28, 2009 at 4:53 PM, J. Shirley wrote: > On Mon, Dec 28, 2009 at 7:13 AM, Tomas Doran wrote: >> >> On 28 Dec 2009, at 09:16, Ben van Staveren wrote: >>> >>> Warning: I use this myself, it seems to work, but it's a hack. YMMV. >>> Standard disclaimer applies. >> >> I.e. It is very much

Re: [Catalyst] C::P::Authentication, force user authentication

2009-12-28 Thread J. Shirley
On Mon, Dec 28, 2009 at 7:13 AM, Tomas Doran wrote: > > On 28 Dec 2009, at 09:16, Ben van Staveren wrote: >> >> Warning: I use this myself, it seems to work, but it's a hack. YMMV. >> Standard disclaimer applies. > > I.e. It is very much relying on an implementation detail which I/we can and > _wi

Re: [Catalyst] C::P::Authentication, force user authentication

2009-12-28 Thread Tomas Doran
On 28 Dec 2009, at 09:16, Ben van Staveren wrote: Warning: I use this myself, it seems to work, but it's a hack. YMMV. Standard disclaimer applies. I.e. It is very much relying on an implementation detail which I/we can and _will_ feel free to change at our leisure if needed. The solution

Re: [Catalyst] C::P::Authentication, force user authentication

2009-12-28 Thread RafaƂ Pocztarski
On Mon, Dec 28, 2009 at 10:00, David Schmidt wrote: > Hello > > When a user lost his password I send a digest by email. > If he enters this digest I want to automatically authenticate the user > so he can edit his password. You can add another authentication realm to do what you need and then eit

Re: [Catalyst] C::P::Authentication, force user authentication

2009-12-28 Thread Ben van Staveren
It's a hack but it works... in a way. If you are using DBIx::Class, you can load the user record: my $user = $c->model('YourUserModel')->find(userid); $c->session->{__user} = { $user->get_columns }; As far as C::P::Authentication is concerned, the user is now authenticated. Forgot whether the

[Catalyst] C::P::Authentication, force user authentication

2009-12-28 Thread David Schmidt
Hello When a user lost his password I send a digest by email. If he enters this digest I want to automatically authenticate the user so he can edit his password. I only found this method but it says in the docs you shouldn't use it in your code as it is an internal function only. $c->set_authenti