MyBB Hacks

Full Version: how to get uid from username
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
how to get uid from username??
Not the current logged in user..

PHP Code:
$username = 'teddy bear';
$uid = $db->fetch_field($db->simple_select('users', 'uid', 'username="'.$db->escape_string($username).'"'), 'uid');

thank you mate...
Reference URL's