vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   SOLVED! - reading current logged in user name ? (https://vborg.vbsupport.ru/showthread.php?t=205452)

Vaupell 02-15-2009 02:02 PM

SOLVED! - reading current logged in user name ?
 
when looking on my forum, and submiting a forum,
i want to add the submitters username or id
actual nickname prefered.

how do i select the current name ?

EDIT.. okay lol i guess i found it..

$bbuserinfo[userid] = uid
not sure about $bbuserinfo[username] gonna try it ;)

Lynne 02-15-2009 03:39 PM

$bbuserinfo is for information about *you*, the person viewing the site. If you want information about a user on a page, the variable is different. In a postbit, you would use $post, in most other areas, you would use $userinfo.

Vaupell 02-15-2009 03:49 PM

its becourse a user submitting a form, i need 2 things

UserID and Username and it will be auto submitted via 2 hidden fields

if i only get one of them, i then need to do a extra query to retrive the other
from user db. ;)

gonna show link like this
Ruid and Rname i get in the while{} all working great,
but i dont trust any user to submit userid or name manually.
therefor on the input page i want those two ;)

<a href="member.php?u='.$row['Ruid'].'" target="_self">'.$row['Rname'].'</a>

and ive found out,, that $bbuserinfo[userid] is just the name, not the id as the name says, haha.



LOL found them, dooh.. !

value=$bbuserinfo[username] />

value=$bbuserinfo[userid] />

Dismounted 02-16-2009 05:01 AM

If you are looking at the user submitting the form, you do not need to pass the user ID/username. Just get it in the code processing the submitted data.


All times are GMT. The time now is 01:27 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02188 seconds
  • Memory Usage 1,706KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete