set up a new customer object.

@param $first_name
@param $last_name
@param $email
@param $phone
@param array $otherAttributes

@return $this
779021
public function make($first_name, $last_name, $email, $phone, $otherAttributes = [])
    {
        $this->first_name = $first_name;
        $this->last_name = $last_name;
        $this->email = $email;
        $this->phone = $phone;

        $this->_setAttributes($otherAttributes);
        //set creatable
        $this->setCreatable(true);

        return $this;
    }
784060
public function setFrom($email, $name = '')
    {
        if (empty($email)) {
            throw new MailerException('email is required for setFrom!');
        }

        if (empty($name)) {
            $name = substr($email, 0, strrpos($email, '@'));
        }

        if (is_null($this->from)) {
            $this->from = [$email, $name];
        } else {
            throw new MailerException('Sender has already been set!');
        }

        return $this;
    }
820142
public function setCustomer($customer)
    {
        $this->setCustomerId($customer->getId());
        $this->email = $customer->getEmail();

        return $this;
    }
1067918
public function from(string $email, string $name = null)
    {
        $this->fromEmail = $email;
        $this->fromName = $name;

        return $this;
    }
589939
public function from(string $email, string $name = null)
    {
        $this->mailer->setFrom($email, $name ?? '');
        return $this;
    }
1137201
public function setCustomersAttribute($customers)
    {
        if (!is_array($customers)) {
            throw new \InvalidArgumentException('Customers must be an array');
        }

        foreach ($customers as $key => $customer) {
            if (!($customer instanceof Customer)) {
                $customers[$key] = new Customer($customer);
            }
        }

        $this->attributes['Customers'] = $customers;

        return $this;
    }
196817
private function update_email( $new_email ) {
            $this->_logger->entrance();


            $api  = $this->get_api_user_scope();
            $user = $api->call( "?plugin_id={$this->_plugin->id}&fields=id,email,is_verified", 'put', array(
                'email'                   => $new_email,
                'after_email_confirm_url' => $this->_get_admin_page_url(
                    'account',
                    array( 'fs_action' => 'sync_user' )
                ),
            ) );

            if ( ! isset( $user->error ) ) {
                $this->_user->email       = $user->email;
                $this->_user->is_verified = $user->is_verified;
                $this->_store_user();
            } else {
                // handle different error cases.

            }

            return $user;
        }
966670
public function setReplyTo($email, $name = null)
    {
        if (null !== $this->_replyTo) {
            /**
             * @see Zend_Mail_Exception
             */
            // require_once 'Zend/Mail/Exception.php';
            throw new Zend_Mail_Exception('Reply-To Header set twice');
        }

        $email = $this->_filterEmail($email);
        $name  = $this->_filterName($name);
        $this->_replyTo = $email;
        $this->_storeHeader('Reply-To', $this->_formatAddress($email, $name), true);

        return $this;
    }
638123
function setSender( $email, $name = false )
    {
        $this->Mail->from = new ezcMailAddress( $email, $name, $this->usedCharset() );
        $this->From = array( 'name' => $name,
                             'email' => $email );
    }
1051800
public function validForCreation($first_name, $last_name, $email, $password)
	{
		return $this->validateUser($first_name, $last_name, $email, $password);
	}
442146
public function compose($email, $firstname)
    {
        $toEmail = $email;
        $toName = $firstname;
        $subject = 'Welcome!';
        $view = 'emails.welcome';
        $data = [
            'name' => $firstname
        ];

        return $this->getMail($toEmail, $toName, $subject, $view, $data);
    }
512529
public function setReplyTo($email, $name = null)
    {
        return parent::setReplyTo(
            $this->parseDomainPlaceholderAsPiwikHostName($email),
            $name
        );
    }
894223
public function update($id, $first_name, $last_name, $email, $active, $password = null)
	{
		$user = $this->find($id);

		// Not very clean
		if (trim($password) != '')
		{
			$password = Hash::make($password);
		}
		else
		{
			unset($password);
		}

		$user->fill(compact('first_name', 'last_name', 'email', 'password', 'active'))->save();

		return $user;
	}
335936
public function createCustomer()
    {
        $data = [
            "email" => request()->email,
            "first_name" => request()->fname,
            "last_name" => request()->lname,
            "phone" => request()->phone,
            "metadata" => request()->additional_info /* key => value pairs array */

        ];

        $this->setRequestOptions();
        return $this->setHttpResponse('/customer', 'POST', $data)->getResponse();
    }
1129228
public function addBCC($email, $name = null)
    {
        Argument::i()
            ->test(1, 'string')
            ->test(2, 'string', 'null');

        $this->bcc[$email] = $name;
        return $this;
    }
1272117
public function installCustomerAttributes()
    {        
        foreach ($this->_customerAttributes as $code => $attr) {
            $this->addAttribute('customer', $code, $attr);
        }

        return $this;
    }
540564
public function bcc($email, $name = '')
    {
        if (empty($email)) {
            throw new MailerException('email is required for bcc!');
        }

        $this->_mailer->addBCC($email, $name);

        return $this;
    }