You are here

public function Messaging_User_Object::set_user in Messaging 6.4

Set user account

Parameters

$account: User account or user id

File

includes/messaging_object.class.inc, line 90
Drupal Messaging Framework - Base classes

Class

Messaging_User_Object
Messaging user's object

Code

public function set_user($account) {
  if (is_numeric($account)) {
    $this->uid = $account;
    $this->_user = NULL;
  }
  elseif (is_object($account)) {
    $this->uid = $account->uid;
    $this->_user = $account;
  }
  else {
    $this->uid = 0;
    $this->_user = $account;
  }
}