本文整理汇总了PHP中Profile::id方法的典型用法代码示例。如果您正苦于以下问题:PHP Profile::id方法的具体用法?PHP Profile::id怎么用?PHP Profile::id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Profile
的用法示例。
在下文中一共展示了Profile::id方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ListMergeIssues
private static function ListMergeIssues(Profile $profile)
{
if (Platal::globals()->merge->state != 'done') {
return null;
}
$flags = XDB::fetchOneCell('SELECT issues
FROM profile_merge_issues
WHERE pid = {?}', $profile->id());
if (!$flags) {
return null;
}
return new PlFlagSet($flags);
}
示例2: modify
protected function modify(Profile $profile)
{
$q = $this->dao->prepare('UPDATE ' . $this->table() . ' SET GENDER = :gender, LASTNAME = :lastname, FIRSTNAME = :firstname, DESCRIPTION = :description, PHONE = :phone, MOBILE_PHONE = :mobilePhone, OFFICE_PHONE = :officePhone, WEBSITE = :website, AVATAR = :avatar, USER_ID = :userId, MAIN_ADDRESS_ID = :mainAddressId, ALTERNATE_CURRENCIES_USED = :alternateCurrenciesUsed WHERE ID = :id');
$q->bindValue(':gender', $profile->getGender());
$q->bindValue(':lastname', $profile->getLastname());
$q->bindValue(':firstname', $profile->getFirstname());
$q->bindValue(':description', $profile->getDescription());
$q->bindValue(':phone', $profile->getPhone());
$q->bindValue(':mobilePhone', $profile->getMobilePhone());
$q->bindValue(':officePhone', $profile->getOfficePhone());
$q->bindValue(':website', $profile->getWebsite());
$q->bindValue(':avatar', $profile->getAvatar());
$q->bindValue(':userId', $profile->getUserId(), PDO::PARAM_INT);
$q->bindValue(':mainAddressId', $profile->getMainAddressId(), PDO::PARAM_INT);
$q->bindValue(':alternateCurrenciesUsed', $profile->getAlternateCurrenciesUsed());
$q->bindValue(':id', $profile->id(), PDO::PARAM_INT);
$q->execute();
}
示例3: delRegistered
public function delRegistered(PlPage $page, Profile $profile)
{
XDB::execute('DELETE FROM contacts
WHERE uid = {?} AND contact = {?}', S::i('uid'), $profile->id());
if (XDB::affectedRows() > 0) {
S::user()->invalidWatchCache();
Platal::session()->updateNbNotifs();
$page->trigSuccess("Contact retiré !");
}
}
示例4: checkProfile
/** Check that the profile match the given rule.
*/
public function checkProfile(Profile $profile)
{
$this->requireProfiles();
$this->buildQuery();
$count = (int) XDB::rawFetchOneCell('SELECT COUNT(*)
' . $this->query . XDB::format(' AND p.pid = {?}', $profile->id()));
return $count == 1;
}
示例5: isWatchedUser
public function isWatchedUser(Profile $profile)
{
return in_array($profile->id(), $this->watchUsers());
}
示例6: update_display_names
function update_display_names(Profile $profile, array $public_names, array $private_names = null)
{
if (is_null($private_names)) {
$private_names = XDB::fetchAllAssoc('SELECT type, name
FROM profile_private_names
WHERE pid = {?}
ORDER BY type, id', $profile->id());
}
$display_names = build_display_names($public_names, $private_names, $profile->isFemale());
XDB::execute('UPDATE profile_display
SET public_name = {?}, private_name = {?},
directory_name = {?}, short_name = {?}, sort_name = {?}
WHERE pid = {?}', $display_names['public_name'], $display_names['private_name'], $display_names['directory_name'], $display_names['short_name'], $display_names['sort_name'], $profile->id());
Profile::rebuildSearchTokens($profile->id(), false);
if ($profile->owner()) {
update_account_from_profile($profile->owner()->id());
}
}
示例7: register
public static function register(Profile $profile, $field)
{
XDB::execute('INSERT INTO watch_profile (pid, ts, field)
VALUES ({?}, NOW(), {?})
ON DUPLICATE KEY UPDATE ts = NOW()', $profile->id(), $field);
}