EDITED: This comment was split from the original one which was dated from 2008 to 2012, which was quite an old discussion and dealt with Moodle 1.8 - 2-2, however...
WHILST THIS MAY HELP SOME USERS THE CODE HERE HAS NOT BEEN VERIFIED AND MAY NOT WORK.
(Edited by Mary Evans - original submission Thursday, 23 October 2014, 11:13 AM)
Stumbled upon the problem and worked out some CSS tricks, cause by hard coding the moodle core is really not my way.
Here's my markup:
<div class="logininfo">
Sie sind angemeldet als
<a title="Profil anzeigen" href="...">x y</a>
(
<a href="...">Logout</a>
)
</div>
and the CSS:
.login_info {
visibility: hidden;
}
.logininfo a {
visibility: visible;
}
.logininfo a:first-child {
optional css rules
}
.logininfo a:first-child::before {
content: "custom text";
}
The trick is to hide the whole login container and make the particular login link visible again. The pseudo class :before allows custom text within (!) the link.