<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Like that, I doubt your userenv will
      contain anything.  You first need to log in.<br>
      <br>
      But you could add the code in cataloguing/addbooks.pl for example.<br>
      Somewhere after the <br>
          my ( $template, $loggedinuser, $cookie ) = <b>get_template_and_user</b>(<br>
      ...<br>
      <br>
      You could have something like <br>
          warn "AKAFORTES " . C4::Context->userenv->{'surname'};
      <br>
      and look into your koha-error_log to see it.<br>
      <br>
      But this would probably be used somewhere where is done the <b>ModBiblio</b>
      call in cataloguing, just before, to add something like<br>
          my $z042 = $record->field('042');<br>
          if($z042){<br>
              $z042->add_subfields('a',
      C4::Context->userenv->{'surname'});<br>
          }<br>
      <br>
      That code is a bit naive, but you get the idea.<br>
      <br>
      <div class="moz-signature">
        <style type="text/css">
.moz-signature {
 color: #FFFFFF;
}
.sig_inlibro {
 padding-top : 2px;
 color: #888888;
 font-family : "Trebuchet MS", verdana;
 font-size: 90%;
}
.sig_content {
 border-top: 2px solid #DDDDDD;
 border-bottom: 2px solid #BFD13D;
 background-color : #F6F6F6;
 padding-left:10px;
}
.sig_inlibro a:visited, .sig_inlibro a:hover, .sig_inlibro a:link {
 text-decoration: none;
 color: #005B85;
}
.nom {
 color: #005B85;
 font-weight : bold;
}
.inlibro, .in {
 color: #BFD13D;
}
.libro {
 color: #005B85;
}
.in, .libro {
 font-size : 120%;
}
.desc {
    margin-bottom: 0;
    padding-bottom: 5px;
}
.small {
 font-size: 80%;
}
.tagline {
 color : #00BCE4;
}
.sig_footer {
 padding-left : 10px;
 background-color : #EEEFEA;
}
</style>
        <div class="sig_inlibro">
          <div class="sig_content"> <span class="nom">Philippe Blouin,</span><br>
            <span class="tagline small">Responsable du développement
              informatique</span><br>
            <p class="desc small"> Tél.  : (888) 604-2627<br>
              <a href="mailto:philippe.blouin@inLibro.com">philippe.blouin@inLibro.com</a>
            </p>
          </div>
          <div class="sig_footer"> <span class="in">in</span><span
              class="libro">Libro</span> <span class="tagline small">|
              pour esprit libre |</span> <a class="small"
              href="http://www.inLibro.com">www.inLibro.com</a> </div>
        </div>
      </div>
      On 09/24/2015 02:09 AM, akafortes wrote:<br>
    </div>
    <blockquote cite="mid:1443074988656-5854481.post@n5.nabble.com"
      type="cite">
      <pre wrap="">Thank you very much!!!! That was just what I needed 
Based on the "EXAMPLE.pl", I just did this:

use Modern::Perl;

use C4::Auth;
use C4::Output;

my $builder= sub {
    my $params = shift;
    my $id = $params->{id};
        my $user=C4::Context->userenv->{'surname'};

    return qq|
|;
};

return { builder => $builder};


Philippe Blouin wrote
</pre>
      <blockquote type="cite">
        <pre wrap="">Are you looking for the information itself, like the content of 
C4::Context->userenv ?  It is a hash with the logged user info, like 
C4::Context->userenv->{'surname'}

(i think :) )

Regards,

Philippe Blouin,
Responsable du développement informatique

Tél.  : (888) 604-2627
</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap="">philippe.blouin@
</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap=""> &lt;mailto:
</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap="">philippe.blouin@
</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap="">&gt;

inLibro | pour esprit libre | <a class="moz-txt-link-abbreviated" href="http://www.inLibro.com">www.inLibro.com</a>
&lt;<a class="moz-txt-link-freetext" href="http://www.inLibro.com&gt">http://www.inLibro.com&gt</a>;
On 09/22/2015 09:16 AM, akafortes wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">Hello G.K.MANJUNATH,
thank you for your answer but I'm afraid that's not what I'm looking for.
It's my understanding that this field is used for when the specified
record
is stored in an electronic form and in this field you save information
about
its location and maybe credentials (or something like that) in order to
access it.

G.K.MANJUNATH wrote
</pre>
          <blockquote type="cite">
            <pre wrap="">Marc tag 856$l  is for  Logon (NR).

I do not know whether the login code gets added to this field.  If can
customise you may be able store it.

check at <a class="moz-txt-link-freetext" href="http://www.loc.gov/marc/bibliographic/bd856.html">http://www.loc.gov/marc/bibliographic/bd856.html</a>


tks
g.k.m


On Tue, 22 Sep 2015, akafortes wrote:

</pre>
            <blockquote type="cite">
              <pre wrap="">Hello,
is it possible to get the username of the logged in user and use it in
a
MARC field?
I would like to add a field where I keep info about who catalogued a
record.



--
View this message in context:
<a class="moz-txt-link-freetext" href="http://koha.1045719.n5.nabble.com/Cataloguer-s-info-in-MARC-field-tp5854171.html">http://koha.1045719.n5.nabble.com/Cataloguer-s-info-in-MARC-field-tp5854171.html</a>
Sent from the Koha-devel mailing list archive at Nabble.com.
_______________________________________________
Koha-devel mailing list

</pre>
            </blockquote>
            <pre wrap=""><a class="moz-txt-link-abbreviated" href="mailto:Koha-devel@.koha-community">Koha-devel@.koha-community</a>
</pre>
            <blockquote type="cite">
              <pre wrap=""><a class="moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
website : <a class="moz-txt-link-freetext" href="http://www.koha-community.org/">http://www.koha-community.org/</a>
git : <a class="moz-txt-link-freetext" href="http://git.koha-community.org/">http://git.koha-community.org/</a>
bugs : <a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a>

</pre>
            </blockquote>
            <pre wrap="">_______________________________________________
Koha-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Koha-devel@.koha-community">Koha-devel@.koha-community</a>
<a class="moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
website : <a class="moz-txt-link-freetext" href="http://www.koha-community.org/">http://www.koha-community.org/</a>
git : <a class="moz-txt-link-freetext" href="http://git.koha-community.org/">http://git.koha-community.org/</a>
bugs : <a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a>
</pre>
          </blockquote>
          <pre wrap="">



--
View this message in context:
<a class="moz-txt-link-freetext" href="http://koha.1045719.n5.nabble.com/Cataloguer-s-info-in-MARC-field-tp5854171p5854258.html">http://koha.1045719.n5.nabble.com/Cataloguer-s-info-in-MARC-field-tp5854171p5854258.html</a>
Sent from the Koha-devel mailing list archive at Nabble.com.
_______________________________________________
Koha-devel mailing list

</pre>
        </blockquote>
      </blockquote>
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap=""><a class="moz-txt-link-abbreviated" href="mailto:Koha-devel@.koha-community">Koha-devel@.koha-community</a>
</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap=""><a class="moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
website : <a class="moz-txt-link-freetext" href="http://www.koha-community.org/">http://www.koha-community.org/</a>
git : <a class="moz-txt-link-freetext" href="http://git.koha-community.org/">http://git.koha-community.org/</a>
bugs : <a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a>
</pre>
        </blockquote>
        <pre wrap="">

_______________________________________________
Koha-devel mailing list
</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap=""><a class="moz-txt-link-abbreviated" href="mailto:Koha-devel@.koha-community">Koha-devel@.koha-community</a>
</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap=""><a class="moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
website : <a class="moz-txt-link-freetext" href="http://www.koha-community.org/">http://www.koha-community.org/</a>
git : <a class="moz-txt-link-freetext" href="http://git.koha-community.org/">http://git.koha-community.org/</a>
bugs : <a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a>
</pre>
      </blockquote>
      <pre wrap="">




--
View this message in context: <a class="moz-txt-link-freetext" href="http://koha.1045719.n5.nabble.com/Cataloguer-s-info-in-MARC-field-tp5854171p5854481.html">http://koha.1045719.n5.nabble.com/Cataloguer-s-info-in-MARC-field-tp5854171p5854481.html</a>
Sent from the Koha-devel mailing list archive at Nabble.com.
_______________________________________________
Koha-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a>
<a class="moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
website : <a class="moz-txt-link-freetext" href="http://www.koha-community.org/">http://www.koha-community.org/</a>
git : <a class="moz-txt-link-freetext" href="http://git.koha-community.org/">http://git.koha-community.org/</a>
bugs : <a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a></pre>
    </blockquote>
    <br>
  </body>
</html>