Magento Login model email id with retrieve gender value from collection - magento-1.5

I am new to magento. How to load customer collection to retrieve gender value by passing login email id?
Thanks.
Praksah

Afaik, Magento does not have explicit email id's for customers, only email addresses.
To retrieve the gender for a given email address you could use:
$oCustomer = Mage::getModel('customer/customer')
->setWebsiteId(1)
->loadByEmail('example#example.com');
var_dump($oCustomer->getGender());
The setWebsiteId(1) part is only neccessary when running with website scope.

Related

How to optimize database design?

I am working on an ecommerce app. This app will have login/signup with phone no. only.
My partner does not want to create user without mobile verification. To avoid duplicate data in the database if a user doesn't proceed with OTP verification.
My aproach is to create user table and user otp table.
users:
id
name,
phone,
email
user_resources:
id,
user_id(foreign key),
otp
so as you can see otp cannot be create without a user_id.
The other idea is to create everything seprate like below. I think this design is more prone to false database. It will be defficult to create database reports.
users:
id
name,
# only two columns in users table
user_resources:
id,
user_id(users table),
otp
verify_phone:
user_id(foreign key users)
phone
is_phone_verified
verify_email:
user_id(foreign key users)
email
is_email_verified
Is the second approach good?

Creating a Contact with a Customer External Id

Is it possible to create a contact through the NetSuite SOAP API (SuiteTalk) for a customer using the customer external id? I tried setting the RecordRef external id and type to customer but received the error "Nonexistent externalId 123 for company" but a customer with that external id does exist.
As you mentioned that you already checked that externalid exists for the customer. This error is seen when the customer record is inactive. Can you check if the customer is active or not. If it's not then try integrating with an active customer. Please let me know if this works! Thanks

DocuSign REST API. Changing user's email address possible?

I've tried this https://developers.docusign.com/esign-rest-api/reference/Users/Users/update#request and the PUT succeeds but doesn't change the user's email address. Other attributes in the same body, e.g. jobTitle, update successfully.
It it possible to update an existing user's email address with DocuSign's REST API?
Thanks,
Graham
The new email address requires validation. Can you check if an auto-generated email is sent to the new address to validate it. I think once the user clicks it and logs in to the account to confirm - it will be updated.

Email ID for the same email changes?

I'm facing an issue lately that the id of an email changes.
I have an application that search the mail box on an hourly basis and I store the email id in order to prevent processing of the same email twice (the scans overlap hence I see the same emails more than once).
Any idea what can cause this change?
I understand you mean Google's ID which is returned by the API like with this example code; https://developers.google.com/gmail/api/v1/reference/users/messages/list#try-it
That ID of a message doesn't change by itself.
If one moves the email out of the account, and back in (via IMAP), then it would get a new ID.
Also, if you check the same email but in a different Gmail account, the ID will be different. the ID is unique only per account.
Perhaps it is useful for you to use the message-id? The message-id uniquely identifies any email, this ID is in the email header generated by the sending server and does not change. You can search for it in Gmail with rfc822msgid:
Hope this answers your question, but also let us know if not. ^^

Not possible to get email id from instagram login

I am using instagram login in my website. I get the username only from instagram. I can't get the email id to check with the already existing one in my database. Is there any way to get the email id?
The bottom of this page:
https://instagram.com/developer/authentication/ mentions the scopes that are supported and email is not one of them, so you will not get email.

Resources