Hi John,<div><br></div><div>I&#39;ll give a try and post it after the successful run. Meanwhile, a workaround , I used session to store db object for the user and used it.</div><div><br></div><div>thanks for the guidance..</div>
<div><br></div><div>Regards,</div><div>ROhan<br><br><div class="gmail_quote">On Tue, May 31, 2011 at 7:02 AM, John Romkey <span dir="ltr">&lt;<a href="mailto:romkey@romkey.com">romkey@romkey.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div class="im"><div><div>On May 30, 2011, at 11:27 AM, Rohan M wrote:</div><blockquote type="cite"><div>I got carried away with the other work for the same app. Now I&#39;m back to this point again. </div>
<div><br></div><div>I created a file called User.pm and put it under Model directory. </div>
<div>After putting,  use base &quot;Catalyst::Authentication::Store::Htpasswd::User&quot;;  I am trying to use around find_user or any method that is present in the base class but I ended up getting following error.</div>

<div><br></div><div>&quot;Couldn&#39;t load class (MyApp) because: The method &#39;check_password&#39; was not found in the inheritance hierarchy.&quot;</div><div><br></div><div>I&#39;m sorry to ask you again but I&#39;m not sure how the following subclassing can be done.</div>

<div><br></div><div>Could you send few more details ( example) ?</div><div><br></div><div>====</div><div><div>package MyApp::Model::User;</div><div>use Moose;</div><div>use namespace::autoclean;</div><div>use Switch;</div>

<div>use base &quot;Catalyst::Authentication::Store::Htpasswd::User&quot;;</div><div>extends &#39;Catalyst::Model&#39;;</div><div><br></div><div><br></div><div>around check_password =&gt; sub {</div><div>   my ($orig, $self, $authinfo, $c, @args) = @_;</div>

<div>   my $user = $self-&gt;$orig($authinfo, $c, @args);</div><div>   return $user;</div><div>}; </div></div><div><br></div><div>OR</div><div><br></div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">around find_user =&gt; sub {<br>

   my ($orig, $self, $authinfo, $c, @args) = @_;<br>   my $user = $self-&gt;$orig($authinfo, $c, @args);<br>   $user-&gt;extra_field($c-&gt;model(&#39;DB::User&#39;)-&gt;find({ username =&gt; $user-&gt;id })-&gt;first-&gt;extra_field;<br>

   return $user;<br>};</span></div></blockquote><br></div></div><div>Rohan,</div><div><br></div><div>I haven&#39;t verified this but I think that what you want to do is make it be a regular class, not a Catalyst component. Then in your configuration where you specify your user_class for your store use MyApp::User rather than Catalyst::Authentication::Store::Htpasswd::User</div>
<div><br></div><div>package MyApp::User;</div><div class="im"><div>use Moose;</div><div>use namespace::autoclean;</div></div><div>extends &#39;Catalyst::Authentication::Store::Htpasswd::User&#39;;</div><div class="im"><div>
<br></div><div><div><div>around check_password =&gt; sub {</div><div>   my ($orig, $self, $authinfo, $c, @args) = @_;</div><div>   my $user = $self-&gt;$orig($authinfo, $c, @args);</div><div>   return $user;</div><div>};</div>
</div><br></div></div><div><div class="im"><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">around find_user =&gt; sub {<br>   my ($orig, $self, $authinfo, $c, @args) = @_;<br>   my $user = $self-&gt;$orig($authinfo, $c, @args);<br>
   $user-&gt;extra_field($c-&gt;model(&#39;DB::User&#39;)-&gt;find({ username =&gt; $user-&gt;id })-&gt;first-&gt;extra_field;<br>   return $user;<br>};</span></div><div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br>
</span></div></div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br></span></div></div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><span style="white-space:pre-wrap">        </span>- john romkey</span></div>
<div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><span style="white-space:pre-wrap">        </span><a href="http://www.romkey.com/" target="_blank">http://www.romkey.com/</a></span></div><div>
<span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br></span></div></div><br></div><br>_______________________________________________<br>
List: <a href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>
Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>
Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>
Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br>
<br></blockquote></div><br><br><div><span style="line-height:32px;font-size:large"><br></span></div><br>
</div>