public function get() { $data = parent::get(); $user = (new SimpleUser($data['account']))->get(); $data['type'] = $user['type']; return array_replace($user, $data); }
public function get() { if ($t = parent::get()) { $t['package'] = $this->_package->get($t['package']); } return $t; }
public function invalidate($id, $account) { $user = new User($id); $uinfo = $user->get(); $user->modify(array('_id' => $user->id), array('$addToSet' => array('social_invalidated' => $account))); $recipients = array($id); $this->add(array('sender' => $id, 'recipients' => $recipients, 'text' => $this->_body($this->_prefix . __FUNCTION__ . '.php', array('social' => $this->_social_account($account))), 'type' => $this->_prefix . __FUNCTION__, 'url' => Url::base('influencer/social'))); $this->mail_enqueue(array('to' => $uinfo['email'], 'from' => $this->_from_email, 'subject' => 'Social Account Invalidated', 'message' => $this->_mail_body($this->_prefix . __FUNCTION__ . '.php', array('user' => $uinfo, 'social' => $this->_social_account($account))))); }
public function activation($id, $by = null) { $user = new User($id); $uinfo = $user->get(); $binfo = null; if ($by !== null) { $buser = new User($by); $binfo = $buser->get(); } else { $by = $id; $binfo = $uinfo; } $this->mail_enqueue(array('to' => $uinfo['email'], 'from' => $this->_from_email, 'subject' => 'Account ' . ($uinfo['active'] ? 'Activated' : 'Deactivated'), 'message' => $this->_mail_body($this->_prefix . __FUNCTION__ . '.php', array('user' => $uinfo, 'by' => $binfo)))); }