Jump to content

Get the email of the account owner.


JesusSuarz

Recommended Posts

sometimes the client can have 2 emails.

one for your account details and one for the account owner.

I need to know if the account owner's email is verified.

The var: 

$client = Menu::context("client");

gets the email that the customer has in the account details, however this is not the email owner of the account.

I hope to make myself understood correctly.

 

Edited by JesusSuarz
Link to comment
Share on other sites

14 hours ago, JesusSuarz said:

sometimes the client can have 2 emails.

one for your account details and one for the account owner.

if I was being picky, that's the client having one email address, and the user having another... not the client having two. 🙂

14 hours ago, JesusSuarz said:

I need to know if the account owner's email is verified.

if you want to do it with client context (using ContactUser authentication would be another option - or even capsule), then this would be an option...

	$client = Menu::context("client");
	$clientowner = $client->owner();
	$useremail = $clientowner->email;
	$verifiedemail = $clientowner->emailVerifiedAt;
	if(!is_null($verifiedemail)) {
		$verifydate = $verifiedemail->toDateString(); 
	}

$verifiedemail is boolean - so if it's NULL, then the user's email address hasn't been verified... if it has been, then $verifydate will contain a Carbon date of when it occurred.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated