Get WordPress user_id from meta_key meta_value pair

Earlier today I was working on a user-account class that talks to an api and needed to get the associated user_id from the returned value. All I had to from was a custom user_meta value and the meta_key. I figured there would be a wp function called get_user_id_by_meta, or something similar, but I didn’t find one. So, I made one.

This function is rather simple, but could easily be much more. This function is actually a method in a class so the naming convention is safe. However, if you plan to use it outside of a class I suggest that you change the name.

Get a WordPress users id from meta_key and meta_value:

If you found this helpful please let me know. If you have any questions, comments, or a more efficient way let me know.

November in Photos 2011

This was my first full month of a new camera, well a new phone which has a much better camera! So here you have a lot more random pics than recent months. I can only expect that December will be the same. I actually attempted to do a daily mug shot for about two or three days. I couldn’t handle that many pictures of myself… It would be cool to see a time line of myself over a year or two, but I don’t think I could post each pic. (seriously who wants to see that much of my face, not me :)

Morning Coffee

Morning Office

Breakfast Orange

Dessert! There were strawberries too

Scooter Eyes

Morning Coffee

Breakfast Orange man

Pathfinder!!

Enter the volcano

Volcano crawl

Volcano crawl

Volcano crawl

Smily face

Nashville Sunrise

Nashville Sunrise

Nashville Sunrise

Talisman

Im loosing

Morning Office at UglyMugs

Breakfast Orange

Winter is getting closer

Burned

Josh's Bike

Josh and Mike

Todify - Talisman

Talisman

Talisman

Talisman

Bluemoon

Great foggy mornings

Breakfast Orange

Breakfast Orange

I really don't see why people don't like it!

Lilly Exploring

Lilly Exploring

Lilly Exploring

Lilly Exploring

Josh's Mustang

Josh working on his Mustang

Josh's Mustang

Breakfast Orange

The view from UglyMugs parking lot

The view from UglyMugs parking lot

Tuna Casserole

Breakfast Orange

My leaves

PHP Meetup

Daily mug shot

Fall trees

Fall trees

Breakfast Orange

Pizza!

My grocery-bag collection

Nashville Sky

Nashville skyline

Fighting an undead dragon

Um whats going on here?

Morning coffee

Jake Francisco reincarnate

Daily mugshot

This is what i would look like if i ate donuts for two years strait :p

Daily Mug Shot

Daily mug shot

Statue at bicentennial park nashville

Bicentennial park Nashville

My growing Manga collection

UglyMugs East Nashville Saturday night music

Breakfast Orange

A giant leaf

It's raining again!

Breakfast Orange

East Nashville

November 2011 Nashville WordPress Meetup

November 2011 Nashville WordPress Meetup

Breakfast Orange

Munchkin

Munchkin

Morning office

Frosty morning

Frosty morning

Shiny downtown Nashville

The Castle Recording Studio

The Castle Recording Studio

Lunchtime Orange

Weekly mugshot, because dailymug was just too much

Josh's bike

Josh heading out

Lunchtime Orange

Margaret & Lilly

Margaret

Twilight Imperium

GameNight Twilight Imperium

Twilight Imperium

Twilight Imperium

Twilight Imperium

Revenge of the Breakfast Orange

Rainy-day Nashville

Rainy-day Nashville

Happy Breakfast Orange

Nashville Sky

Breakfast Orange

Breakfast Orange Bug

My New office layout

My New office layout

Breakfast Orange-knife

Cooking the greens

Mr Breakfast Orange

Nashville

Breakfast Orange

Movie wall

Breakfast Orange

Happy Breakfast Orange

Breakfast Orange

Todays Office aka my room

Munchkin

Box Eye

I was browsing through my drawings this afternoon and saw this one. Sometimes it’s more apparent that my drawing start off as nothing and evolve as they go on, and I this is definitely one of them.

I started by drawing a box and then it just started morphing into more. I really like drawing little odd characters that seem like they are stuck in a fishbowl.

October in Photos 2011

This month ended with me getting a new phone so I was really excited about better picture quality and a faster camera. My old phone was so slow that the camera wouldn’t even open. So you can expect a lot more useless pictures in the next couple of months.

Ken working at ESpaces
Bob hiding in the silloet
Dice Castle
My font yard
UglyMugs Coffee & Battle Royal
The scooter
Everyone needs a white board
Magnetic poetry
Downtown Nashville
Colab
WordPress Nashville Meetup
WordPress Nashville Meetup group
Ross talking at the WordPress Nashville Meetup
Josh's Bike almost ready to paint
Trigun Vol3
My front yard
Nashville clouds
An ok tetris score Tetris
Mac screen conectors
My shadow
More Nashville
ATT Building
Nashville BarCamp 2010
Nashville
The Castle
Silly face on the white board
Spaghetti in the fridge
Preparing for Twilight Imperium
Twilight Imperium and the hookah
Kevin and Josh plotting - Twilight Imperium
Lilly and Margarot sleeping
Dickerson and Cleavland - Nashville
Nashville sunrise
Working on some site specs
Brain Storming
My front yard again
the man and his robot
Autom Trees
The tree in front of my house
My growing Manga collection
Computer screens dont to retro
Front Porch
Scoot
My Back Yard on a foggy morning
My car on a the morning
Coffee at UglyMugs
Carrot Eye
Fall
Bicentennial Park Nashville
Bicentennial Park Nashville
The Parthenon Nashville
Westend Nashville
coffee at uglymugs
smile