You are here

function multiple_email_make_primary in Multiple E-mail Addresses 6

Same name and namespace in other branches
  1. 5 multiple_email.module \multiple_email_make_primary()
  2. 7 multiple_email.module \multiple_email_make_primary()
  3. 2.x multiple_email.module \multiple_email_make_primary()

Changes specified user's primary e-mail - no error checking!

Parameters

object $account:

object $email:

1 call to multiple_email_make_primary()
multiple_email_primary_form_submit in ./multiple_email_primary_page.inc
Processes multiple_email_primary_form submission

File

./multiple_email.module, line 615
multiple_email module file

Code

function multiple_email_make_primary($email) {
  $account = new stdClass();
  $account->uid = $email->uid;
  user_save($account, array(
    'mail' => $email->email,
  ));
  multiple_email_load(NULL, TRUE);
}