3 * @file mod/profiles.php
7 use Friendica\BaseModule;
8 use Friendica\Content\ContactSelector;
9 use Friendica\Content\Feature;
10 use Friendica\Content\Nav;
11 use Friendica\Core\Config;
12 use Friendica\Core\Hook;
13 use Friendica\Core\L10n;
14 use Friendica\Core\PConfig;
15 use Friendica\Core\Renderer;
16 use Friendica\Core\System;
17 use Friendica\Core\Worker;
18 use Friendica\Database\DBA;
19 use Friendica\Model\Contact;
20 use Friendica\Model\GContact;
21 use Friendica\Model\Profile;
22 use Friendica\Model\User;
23 use Friendica\Module\Login;
24 use Friendica\Network\Probe;
25 use Friendica\Util\DateTimeFormat;
26 use Friendica\Util\Strings;
27 use Friendica\Util\Temporal;
29 function profiles_init(App $a) {
31 Nav::setSelected('profiles');
37 if (($a->argc > 2) && ($a->argv[1] === "drop") && intval($a->argv[2])) {
38 $r = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d AND `is-default` = 0 LIMIT 1",
42 if (! DBA::isResult($r)) {
43 notice(L10n::t('Profile not found.') . EOL);
44 $a->internalRedirect('profiles');
48 BaseModule::checkFormSecurityTokenRedirectOnError('/profiles', 'profile_drop', 't');
50 // move every contact using this profile as their default to the user default
52 q("UPDATE `contact` SET `profile-id` = (SELECT `profile`.`id` AS `profile-id` FROM `profile` WHERE `profile`.`is-default` = 1 AND `profile`.`uid` = %d LIMIT 1) WHERE `profile-id` = %d AND `uid` = %d ",
57 q("DELETE FROM `profile` WHERE `id` = %d AND `uid` = %d",
61 if (DBA::isResult($r)) {
62 info(L10n::t('Profile deleted.').EOL);
65 $a->internalRedirect('profiles');
69 if (($a->argc > 1) && ($a->argv[1] === 'new')) {
71 BaseModule::checkFormSecurityTokenRedirectOnError('/profiles', 'profile_new', 't');
73 $r0 = q("SELECT `id` FROM `profile` WHERE `uid` = %d",
74 intval(local_user()));
76 $num_profiles = (DBA::isResult($r0) ? count($r0) : 0);
78 $name = L10n::t('Profile-') . ($num_profiles + 1);
80 $r1 = q("SELECT `name`, `photo`, `thumb` FROM `profile` WHERE `uid` = %d AND `is-default` = 1 LIMIT 1",
81 intval(local_user()));
83 q("INSERT INTO `profile` (`uid` , `profile-name` , `name`, `photo`, `thumb`)
84 VALUES ( %d, '%s', '%s', '%s', '%s' )",
87 DBA::escape($r1[0]['name']),
88 DBA::escape($r1[0]['photo']),
89 DBA::escape($r1[0]['thumb'])
92 $r3 = q("SELECT `id` FROM `profile` WHERE `uid` = %d AND `profile-name` = '%s' LIMIT 1",
97 info(L10n::t('New profile created.') . EOL);
98 if (DBA::isResult($r3) && count($r3) == 1) {
99 $a->internalRedirect('profiles/' . $r3[0]['id']);
102 $a->internalRedirect('profiles');
105 if (($a->argc > 2) && ($a->argv[1] === 'clone')) {
107 BaseModule::checkFormSecurityTokenRedirectOnError('/profiles', 'profile_clone', 't');
109 $r0 = q("SELECT `id` FROM `profile` WHERE `uid` = %d",
110 intval(local_user()));
112 $num_profiles = (DBA::isResult($r0) ? count($r0) : 0);
114 $name = L10n::t('Profile-') . ($num_profiles + 1);
115 $r1 = q("SELECT * FROM `profile` WHERE `uid` = %d AND `id` = %d LIMIT 1",
116 intval(local_user()),
119 if(! DBA::isResult($r1)) {
120 notice(L10n::t('Profile unavailable to clone.') . EOL);
124 $r1[0]['is-default'] = 0;
125 $r1[0]['publish'] = 0;
126 $r1[0]['net-publish'] = 0;
127 $r1[0]['profile-name'] = DBA::escape($name);
129 DBA::insert('profile', $r1[0]);
131 $r3 = q("SELECT `id` FROM `profile` WHERE `uid` = %d AND `profile-name` = '%s' LIMIT 1",
132 intval(local_user()),
135 info(L10n::t('New profile created.') . EOL);
136 if ((DBA::isResult($r3)) && (count($r3) == 1)) {
137 $a->internalRedirect('profiles/'.$r3[0]['id']);
140 $a->internalRedirect('profiles');
142 return; // NOTREACHED
146 if (($a->argc > 1) && (intval($a->argv[1]))) {
147 $r = q("SELECT id FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
151 if (! DBA::isResult($r)) {
152 notice(L10n::t('Profile not found.') . EOL);
156 Profile::load($a, $a->user['nickname'], $r[0]['id']);
160 function profile_clean_keywords($keywords)
162 $keywords = str_replace(",", " ", $keywords);
163 $keywords = explode(" ", $keywords);
166 foreach ($keywords as $keyword) {
167 $keyword = trim(strtolower($keyword));
168 $keyword = trim($keyword, "#");
169 if ($keyword != "") {
170 $cleaned[] = $keyword;
174 $keywords = implode(", ", $cleaned);
179 function profiles_post(App $a) {
181 if (! local_user()) {
182 notice(L10n::t('Permission denied.') . EOL);
186 $namechanged = false;
188 Hook::callAll('profile_post', $_POST);
190 if (($a->argc > 1) && ($a->argv[1] !== "new") && intval($a->argv[1])) {
191 $orig = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
195 if (! DBA::isResult($orig)) {
196 notice(L10n::t('Profile not found.') . EOL);
200 BaseModule::checkFormSecurityTokenRedirectOnError('/profiles', 'profile_edit');
202 $is_default = (($orig[0]['is-default']) ? 1 : 0);
204 $profile_name = Strings::escapeTags(trim($_POST['profile_name']));
205 if (! strlen($profile_name)) {
206 notice(L10n::t('Profile Name is required.') . EOL);
210 $dob = $_POST['dob'] ? Strings::escapeHtml(trim($_POST['dob'])) : '0000-00-00';
212 $y = substr($dob, 0, 4);
213 if ((! ctype_digit($y)) || ($y < 1900)) {
216 $ignore_year = false;
218 if (!in_array($dob, ['0000-00-00', DBA::NULL_DATE])) {
219 if (strpos($dob, '0000-') === 0 || strpos($dob, '0001-') === 0) {
221 $dob = substr($dob, 5);
225 $dob = '0000-' . DateTimeFormat::utc('1900-' . $dob, 'm-d');
227 $dob = DateTimeFormat::utc($dob, 'Y-m-d');
231 $name = Strings::escapeTags(trim($_POST['name']));
233 if (! strlen($name)) {
237 if ($orig[0]['name'] != $name) {
241 $pdesc = Strings::escapeTags(trim($_POST['pdesc']));
242 $gender = Strings::escapeTags(trim($_POST['gender']));
243 $address = Strings::escapeTags(trim($_POST['address']));
244 $locality = Strings::escapeTags(trim($_POST['locality']));
245 $region = Strings::escapeTags(trim($_POST['region']));
246 $postal_code = Strings::escapeTags(trim($_POST['postal_code']));
247 $country_name = Strings::escapeTags(trim($_POST['country_name']));
248 $pub_keywords = profile_clean_keywords(Strings::escapeTags(trim($_POST['pub_keywords'])));
249 $prv_keywords = profile_clean_keywords(Strings::escapeTags(trim($_POST['prv_keywords'])));
250 $marital = Strings::escapeTags(trim($_POST['marital']));
251 $howlong = Strings::escapeTags(trim($_POST['howlong']));
253 $with = (!empty($_POST['with']) ? Strings::escapeTags(trim($_POST['with'])) : '');
255 if (! strlen($howlong)) {
256 $howlong = DBA::NULL_DATETIME;
258 $howlong = DateTimeFormat::convert($howlong, 'UTC', date_default_timezone_get());
260 // linkify the relationship target if applicable
262 $withchanged = false;
265 if ($with != strip_tags($orig[0]['with'])) {
269 if (strpos($lookup, '@') === 0) {
270 $lookup = substr($lookup, 1);
272 $lookup = str_replace('_',' ', $lookup);
273 if (strpos($lookup, '@') || (strpos($lookup, 'http://'))) {
275 $links = @Probe::lrdd($lookup);
277 foreach ($links as $link) {
278 if ($link['@attributes']['rel'] === 'http://webfinger.net/rel/profile-page') {
279 $prf = $link['@attributes']['href'];
286 $r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1",
287 DBA::escape($newname),
290 if (! DBA::isResult($r)) {
291 $r = q("SELECT * FROM `contact` WHERE `nick` = '%s' AND `uid` = %d LIMIT 1",
292 DBA::escape($lookup),
296 if (DBA::isResult($r)) {
298 $newname = $r[0]['name'];
303 $with = str_replace($lookup, '<a href="' . $prf . '">' . $newname . '</a>', $with);
304 if (strpos($with, '@') === 0) {
305 $with = substr($with, 1);
309 $with = $orig[0]['with'];
313 /// @TODO Not flexible enough for later expansion, let's have more OOP here
314 $sexual = Strings::escapeTags(trim($_POST['sexual']));
315 $xmpp = Strings::escapeTags(trim($_POST['xmpp']));
316 $homepage = Strings::escapeTags(trim($_POST['homepage']));
317 if ((strpos($homepage, 'http') !== 0) && (strlen($homepage))) {
318 // neither http nor https in URL, add them
319 $homepage = 'http://'.$homepage;
321 $hometown = Strings::escapeTags(trim($_POST['hometown']));
322 $politic = Strings::escapeTags(trim($_POST['politic']));
323 $religion = Strings::escapeTags(trim($_POST['religion']));
325 $likes = Strings::escapeHtml(trim($_POST['likes']));
326 $dislikes = Strings::escapeHtml(trim($_POST['dislikes']));
328 $about = Strings::escapeHtml(trim($_POST['about']));
329 $interest = Strings::escapeHtml(trim($_POST['interest']));
330 $contact = Strings::escapeHtml(trim($_POST['contact']));
331 $music = Strings::escapeHtml(trim($_POST['music']));
332 $book = Strings::escapeHtml(trim($_POST['book']));
333 $tv = Strings::escapeHtml(trim($_POST['tv']));
334 $film = Strings::escapeHtml(trim($_POST['film']));
335 $romance = Strings::escapeHtml(trim($_POST['romance']));
336 $work = Strings::escapeHtml(trim($_POST['work']));
337 $education = Strings::escapeHtml(trim($_POST['education']));
339 $hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0);
341 PConfig::set(local_user(), 'system', 'detailled_profile', (($_POST['detailed_profile'] == 1) ? 1: 0));
345 if ($marital != $orig[0]['marital']) {
346 $changes[] = '[color=#ff0000]♥[/color] ' . L10n::t('Marital Status');
349 $changes[] = '[color=#ff0000]♥[/color] ' . L10n::t('Romantic Partner');
351 if ($likes != $orig[0]['likes']) {
352 $changes[] = L10n::t('Likes');
354 if ($dislikes != $orig[0]['dislikes']) {
355 $changes[] = L10n::t('Dislikes');
357 if ($work != $orig[0]['work']) {
358 $changes[] = L10n::t('Work/Employment');
360 if ($religion != $orig[0]['religion']) {
361 $changes[] = L10n::t('Religion');
363 if ($politic != $orig[0]['politic']) {
364 $changes[] = L10n::t('Political Views');
366 if ($gender != $orig[0]['gender']) {
367 $changes[] = L10n::t('Gender');
369 if ($sexual != $orig[0]['sexual']) {
370 $changes[] = L10n::t('Sexual Preference');
372 if ($xmpp != $orig[0]['xmpp']) {
373 $changes[] = L10n::t('XMPP');
375 if ($homepage != $orig[0]['homepage']) {
376 $changes[] = L10n::t('Homepage');
378 if ($interest != $orig[0]['interest']) {
379 $changes[] = L10n::t('Interests');
381 if ($address != $orig[0]['address']) {
382 $changes[] = L10n::t('Address');
383 // New address not sent in notifications, potential privacy issues
384 // in case this leaks to unintended recipients. Yes, it's in the public
385 // profile but that doesn't mean we have to broadcast it to everybody.
387 if ($locality != $orig[0]['locality'] || $region != $orig[0]['region']
388 || $country_name != $orig[0]['country-name']) {
389 $changes[] = L10n::t('Location');
393 $r = q("UPDATE `profile`
394 SET `profile-name` = '%s',
402 `postal-code` = '%s',
403 `country-name` = '%s',
413 `pub_keywords` = '%s',
414 `prv_keywords` = '%s',
428 WHERE `id` = %d AND `uid` = %d",
429 DBA::escape($profile_name),
432 DBA::escape($gender),
434 DBA::escape($address),
435 DBA::escape($locality),
436 DBA::escape($region),
437 DBA::escape($postal_code),
438 DBA::escape($country_name),
439 DBA::escape($marital),
441 DBA::escape($howlong),
442 DBA::escape($sexual),
444 DBA::escape($homepage),
445 DBA::escape($hometown),
446 DBA::escape($politic),
447 DBA::escape($religion),
448 DBA::escape($pub_keywords),
449 DBA::escape($prv_keywords),
451 DBA::escape($dislikes),
453 DBA::escape($interest),
454 DBA::escape($contact),
459 DBA::escape($romance),
461 DBA::escape($education),
462 intval($hide_friends),
467 /// @TODO decide to use DBA::isResult() here and check $r
469 info(L10n::t('Profile updated.') . EOL);
474 q("UPDATE `user` set `username` = '%s' where `uid` = %d",
480 Contact::updateSelfFromUserID(local_user());
482 // Update global directory in background
483 $url = $_SESSION['my_url'];
484 if ($url && strlen(Config::get('system', 'directory'))) {
485 Worker::add(PRIORITY_LOW, "Directory", $url);
488 Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
490 // Update the global contact for the user
491 GContact::updateForUser(local_user());
496 function profiles_content(App $a) {
498 if (! local_user()) {
499 notice(L10n::t('Permission denied.') . EOL);
500 return Login::form();
505 if (($a->argc > 1) && (intval($a->argv[1]))) {
506 $r = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
510 if (! DBA::isResult($r)) {
511 notice(L10n::t('Profile not found.') . EOL);
515 $a->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('profed_head.tpl'), [
516 '$baseurl' => System::baseUrl(true),
519 $opt_tpl = Renderer::getMarkupTemplate("profile-hide-friends.tpl");
520 $hide_friends = Renderer::replaceMacros($opt_tpl,[
522 'hide-friends', //Name
523 L10n::t('Hide contacts and friends:'), //Label
524 !!$r[0]['hide-friends'], //Value
526 [L10n::t('No'), L10n::t('Yes')] //Off - On strings
528 '$desc' => L10n::t('Hide your contact/friend list from viewers of this profile?'),
529 '$yes_str' => L10n::t('Yes'),
530 '$no_str' => L10n::t('No'),
531 '$yes_selected' => (($r[0]['hide-friends']) ? " checked=\"checked\" " : ""),
532 '$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "")
535 $personal_account = !(in_array($a->user["page-flags"],
536 [User::PAGE_FLAGS_COMMUNITY, User::PAGE_FLAGS_PRVGROUP]));
538 $detailed_profile = (PConfig::get(local_user(), 'system', 'detailled_profile') AND $personal_account);
540 $is_default = (($r[0]['is-default']) ? 1 : 0);
541 $tpl = Renderer::getMarkupTemplate("profile_edit.tpl");
542 $o .= Renderer::replaceMacros($tpl, [
543 '$personal_account' => $personal_account,
544 '$detailled_profile' => $detailed_profile,
547 'detailed_profile', //Name
548 L10n::t('Show more profile fields:'), //Label
549 $detailed_profile, //Value
551 [L10n::t('No'), L10n::t('Yes')] //Off - On strings
554 '$multi_profiles' => Feature::isEnabled(local_user(), 'multi_profiles'),
555 '$form_security_token' => BaseModule::getFormSecurityToken("profile_edit"),
556 '$form_security_token_photo' => BaseModule::getFormSecurityToken("profile_photo"),
557 '$profile_clone_link' => ((Feature::isEnabled(local_user(), 'multi_profiles')) ? 'profiles/clone/' . $r[0]['id'] . '?t=' . BaseModule::getFormSecurityToken("profile_clone") : ""),
558 '$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t=' . BaseModule::getFormSecurityToken("profile_drop"),
560 '$profile_action' => L10n::t('Profile Actions'),
561 '$banner' => L10n::t('Edit Profile Details'),
562 '$submit' => L10n::t('Submit'),
563 '$profpic' => L10n::t('Change Profile Photo'),
564 '$profpiclink' => '/photos/' . $a->user['nickname'],
565 '$viewprof' => L10n::t('View this profile'),
566 '$viewallprof' => L10n::t('View all profiles'),
567 '$editvis' => L10n::t('Edit visibility'),
568 '$cr_prof' => L10n::t('Create a new profile using these settings'),
569 '$cl_prof' => L10n::t('Clone this profile'),
570 '$del_prof' => L10n::t('Delete this profile'),
572 '$lbl_basic_section' => L10n::t('Basic information'),
573 '$lbl_picture_section' => L10n::t('Profile picture'),
574 '$lbl_location_section' => L10n::t('Location'),
575 '$lbl_preferences_section' => L10n::t('Preferences'),
576 '$lbl_status_section' => L10n::t('Status information'),
577 '$lbl_about_section' => L10n::t('Additional information'),
578 '$lbl_interests_section' => L10n::t('Interests'),
579 '$lbl_personal_section' => L10n::t('Personal'),
580 '$lbl_relation_section' => L10n::t('Relation'),
581 '$lbl_miscellaneous_section' => L10n::t('Miscellaneous'),
583 '$lbl_profile_photo' => L10n::t('Upload Profile Photo'),
584 '$lbl_gender' => L10n::t('Your Gender:'),
585 '$lbl_marital' => L10n::t('<span class="heart">♥</span> Marital Status:'),
586 '$lbl_sexual' => L10n::t('Sexual Preference:'),
587 '$lbl_ex2' => L10n::t('Example: fishing photography software'),
589 '$disabled' => (($is_default) ? 'onclick="return false;" style="color: #BBBBFF;"' : ''),
590 '$baseurl' => System::baseUrl(true),
591 '$profile_id' => $r[0]['id'],
592 '$profile_name' => ['profile_name', L10n::t('Profile Name:'), $r[0]['profile-name'], L10n::t('Required'), '*'],
593 '$is_default' => $is_default,
594 '$default' => (($is_default) ? '<p id="profile-edit-default-desc">' . L10n::t('This is your <strong>public</strong> profile.<br />It <strong>may</strong> be visible to anybody using the internet.') . '</p>' : ""),
595 '$name' => ['name', L10n::t('Your Full Name:'), $r[0]['name']],
596 '$pdesc' => ['pdesc', L10n::t('Title/Description:'), $r[0]['pdesc']],
597 '$dob' => Temporal::getDateofBirthField($r[0]['dob']),
598 '$hide_friends' => $hide_friends,
599 '$address' => ['address', L10n::t('Street Address:'), $r[0]['address']],
600 '$locality' => ['locality', L10n::t('Locality/City:'), $r[0]['locality']],
601 '$region' => ['region', L10n::t('Region/State:'), $r[0]['region']],
602 '$postal_code' => ['postal_code', L10n::t('Postal/Zip Code:'), $r[0]['postal-code']],
603 '$country_name' => ['country_name', L10n::t('Country:'), $r[0]['country-name']],
604 '$age' => ((intval($r[0]['dob'])) ? '(' . L10n::t('Age: ') . Temporal::getAgeByTimezone($r[0]['dob'],$a->user['timezone'],$a->user['timezone']) . ')' : ''),
605 '$gender' => L10n::t(ContactSelector::gender($r[0]['gender'])),
606 '$marital' => ['selector' => ContactSelector::maritalStatus($r[0]['marital']), 'value' => L10n::t($r[0]['marital'])],
607 '$with' => ['with', L10n::t("Who: \x28if applicable\x29"), strip_tags($r[0]['with']), L10n::t('Examples: cathy123, Cathy Williams, cathy@example.com')],
608 '$howlong' => ['howlong', L10n::t('Since [date]:'), ($r[0]['howlong'] <= DBA::NULL_DATETIME ? '' : DateTimeFormat::local($r[0]['howlong']))],
609 '$sexual' => ['selector' => ContactSelector::sexualPreference($r[0]['sexual']), 'value' => L10n::t($r[0]['sexual'])],
610 '$about' => ['about', L10n::t('Tell us about yourself...'), $r[0]['about']],
611 '$xmpp' => ['xmpp', L10n::t("XMPP \x28Jabber\x29 address:"), $r[0]['xmpp'], L10n::t("The XMPP address will be propagated to your contacts so that they can follow you.")],
612 '$homepage' => ['homepage', L10n::t('Homepage URL:'), $r[0]['homepage']],
613 '$hometown' => ['hometown', L10n::t('Hometown:'), $r[0]['hometown']],
614 '$politic' => ['politic', L10n::t('Political Views:'), $r[0]['politic']],
615 '$religion' => ['religion', L10n::t('Religious Views:'), $r[0]['religion']],
616 '$pub_keywords' => ['pub_keywords', L10n::t('Public Keywords:'), $r[0]['pub_keywords'], L10n::t("\x28Used for suggesting potential friends, can be seen by others\x29")],
617 '$prv_keywords' => ['prv_keywords', L10n::t('Private Keywords:'), $r[0]['prv_keywords'], L10n::t("\x28Used for searching profiles, never shown to others\x29")],
618 '$likes' => ['likes', L10n::t('Likes:'), $r[0]['likes']],
619 '$dislikes' => ['dislikes', L10n::t('Dislikes:'), $r[0]['dislikes']],
620 '$music' => ['music', L10n::t('Musical interests'), $r[0]['music']],
621 '$book' => ['book', L10n::t('Books, literature'), $r[0]['book']],
622 '$tv' => ['tv', L10n::t('Television'), $r[0]['tv']],
623 '$film' => ['film', L10n::t('Film/dance/culture/entertainment'), $r[0]['film']],
624 '$interest' => ['interest', L10n::t('Hobbies/Interests'), $r[0]['interest']],
625 '$romance' => ['romance', L10n::t('Love/romance'), $r[0]['romance']],
626 '$work' => ['work', L10n::t('Work/employment'), $r[0]['work']],
627 '$education' => ['education', L10n::t('School/education'), $r[0]['education']],
628 '$contact' => ['contact', L10n::t('Contact information and Social Networks'), $r[0]['contact']],
631 $arr = ['profile' => $r[0], 'entry' => $o];
632 Hook::callAll('profile_edit', $arr);
636 // If we don't support multi profiles, don't display this list.
637 if (!Feature::isEnabled(local_user(), 'multi_profiles')) {
638 $r = q("SELECT * FROM `profile` WHERE `uid` = %d AND `is-default`=1",
641 if (DBA::isResult($r)) {
642 //Go to the default profile.
643 $a->internalRedirect('profiles/' . $r[0]['id']);
647 $r = q("SELECT * FROM `profile` WHERE `uid` = %d",
650 if (DBA::isResult($r)) {
652 $tpl = Renderer::getMarkupTemplate('profile_entry.tpl');
655 foreach ($r as $rr) {
656 $profiles .= Renderer::replaceMacros($tpl, [
657 '$photo' => $a->removeBaseURL($rr['thumb']),
659 '$alt' => L10n::t('Profile Image'),
660 '$profile_name' => $rr['profile-name'],
661 '$visible' => (($rr['is-default']) ? '<strong>' . L10n::t('visible to everybody') . '</strong>'
662 : '<a href="'.'profperm/'.$rr['id'].'" />' . L10n::t('Edit visibility') . '</a>')
666 $tpl_header = Renderer::getMarkupTemplate('profile_listing_header.tpl');
667 $o .= Renderer::replaceMacros($tpl_header,[
668 '$header' => L10n::t('Edit/Manage Profiles'),
669 '$chg_photo' => L10n::t('Change profile photo'),
670 '$cr_new' => L10n::t('Create New Profile'),
671 '$cr_new_link' => 'profiles/new?t=' . BaseModule::getFormSecurityToken("profile_new"),
672 '$profiles' => $profiles