[drupal-docs] Someone with bypass input data permission please post
Boris Mann
borismann at gmail.com
Sat Apr 2 02:49:59 UTC 2005
Hey:
Someone contacted Ourmedia.org asking for the PHPTemplate code for
doing the login area in the nav bar. I thought it would be a good time
to create a "theme snippets repository", like we have for blocks. So I
did: http://drupal.org/node/19854
But, I can't include the code below because it has too many funky
stuff that thinks I'm trying to hack Drupal. If someone could paste
this into the Custom Login node (http://drupal.org/node/19855), that
would be great.
(the code tags are just for formatting in the handbook)
<code>
<?php if ($user->uid) : ?>
Logged in as: <?php print l($user->name,'user/'.$user->uid); ?> |
<?php print l("logout","logout"); ?>
<?php else : ?>
<?php print l("Register","user/register"); ?> | Login: <form
action="user/login" method="post"><input type="hidden"
name="edit[destination]" value="user" /><input type="text"
maxlength="64" class="form-text" name="edit[name]" id="edit-name"
size="15" value="" /><input type="password" class="form-password"
maxlength="64" name="edit[pass]" id="edit-pass" size="15" value=""
/><input type="submit" name="op" value="Log in" /></form>
<?php endif; ?>
</code>
--
Boris Mann
http://www.bryght.com
More information about the drupal-docs
mailing list