How do you get a user's id from a Magento REST API token? -


following these instructions, it's easy see magento associating oauth tokens user id after they're granted. there way programmatically recover user id, given oauth token?

if helps, can this:

// should collection of 1 element (or 0 if nothing found) $tokens = mage::getmodel('oauth/token')->getcollection()->addfilterbyid($tokenid); foreach ($tokens $token) {     echo $token->getcustomerid(); } 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -