need help on getuser profile details using mean stack - mean-stack

[
Please help on the attached picture code as am unable to fetch the user details. once am ale to fetch the user details then please help me to edit also.

In the back-end u need to send the user details also..in your code that won't happen.
So under the return part u need to add user json object.
res.status(200).json(user);

Related

what is the best route to check is username exist?

I want to create a method to check if the username already exists. I have a method to get user details(an object) which have the route as "organization/user/userid" . I want to keep this route for getting details.
So guys could you please tell me, which is the best route for "check if the user exists" method.
For grabbing user details it could look like this :-
organization/user/details/{userid}
For checking if a user exists:-
organization/user/{userid}

How to extract LIKE in Yammer?

Currently, Admin Export function does only support post & comment thread, user, group extraction. However, I would like to get the list of who LIKE each comment? Any idea to extract such information?
Thanks!!
See this page for the API that should answer your question.
https://developer.yammer.com/docs/usersliked_messagemessage_idjson
There isn't a way to do this in bulk but this should get you what you want.

Returning custom contact fields via the Google contacts api

I have been unable to return any UserDefined/custom fields for a contact. I'm not even wanting to create or update an existing entry as per Programatically adding "New Custom Field" To Google Contacts using Google contact API
I have followed the guide here https://developers.google.com/google-apps/contacts/v3/reference, but still to no avail.
I've called both
https://www.google.com/m8/feeds/contacts/default/full?alt=json
and
https://www.google.com/m8/feeds/contacts/default/full/DEADBEEF?alt=json
in an attempt to get ALL of the values returned. I thought I might have to call each contact id specifically to get the full details, but that doesn't work either.
DEADBEEF is clearly replaced with a valid contact id in my scenario.
/contacts/default determines that request should return contacts for the current auth'd user, which is myself in this case.
Has anyone managed to return custom values, is this even possible?
Thanks
I found the answer, add the ?v=3.0 to the url string eg
https://www.google.com/m8/feeds/contacts/default/full/DEADBEEF?alt=json&v=3.0
However, you should use the preferred method of adding a GData-Version header.

How to denied all requests except some in Magento

The question is not enough clear, so I will explain more.
My client has a requirement in mobile1 about the users all SHOULD not visit all request2
For example:
The users SHOULD: only visit some in below list:
mydomain.com/catalog/product/view
mydomain.com/cusotmer/account/any_action
mydomain.com/onepage/checkout/any_action
So, I am having a solution is at the method: Mage_Core_Controller_Varien_Action::preDispatch()
I will get the request variable to check what is moulde, controller, action. If it is valid in list, if not I will redirect to an accessed denied page.
I know that is bad, so I am looking for other solutions.
1: We've already designed a theme for mobile, just want to give for user some pages are necessary.
2: I mean to the router format: module/ controller/ action.
UPDATE:
Thanks all guys so much. Now, I understand what I need to do. I don't know how to close my question. So please help me if you can. I don't want to be a member who never accept the answer.
This is not good question which could be easy to answer, but very happy for help from #azakolyukin and #elgabbu
So, I think #azakolyukin's comment is correct answer.

hide passed IDs in URL

noob question. when I pass an id in the route to query my DB, is there a way to prevent the actual id from showing in the URL in browser.
If not, is there a way to prevent the user from changing the id in the URL and access other information?
Some sort of validation you get from clicking the link on the previous page or something.
I hope this make sense.
You could retrieve your record with an hash instead of the id directly.
You can use package like https://github.com/mitchellvanw/hashids (there must be some others)
Also, if you just want to hide it, you can POST it to your page. Don't forget that users can still change the form informations.
U can use base64_encode() and base64_decode to hide url from users and preventing them to change.

Resources