Skip to content

Commit c993cd6

Browse files
Merge pull request #152 from cjaoude/add-edit-profile-name
fixes #129 - add first & last name editing to user profile
2 parents 8bbd87e + 4474088 commit c993cd6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

html-templates/profile/profileEdit.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@
7676

7777
<h2 class="h3">{_ 'Contact Information'}</h2>
7878

79+
{field inputName="FirstName" label="First Name" type="text" default=$User->FirstName}
80+
{field inputName="LastName" label="Last Name" type="text" default=$User->LastName}
7981
{field inputName="Email" label="Email" type="email" default=$User->Email}
8082
{field inputName="Phone" label="Phone" type="tel" default=$User->Phone}
8183
{field inputName="Twitter" label="Twitter" type="text" default=$User->Twitter}
@@ -132,4 +134,4 @@
132134
</form>
133135
</div>
134136
</div>
135-
{/block}
137+
{/block}

php-config/ProfileRequestHandler.config.d/laddr.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
ProfileRequestHandler::$profileFields[] = 'FirstName';
4+
ProfileRequestHandler::$profileFields[] = 'LastName';
35
ProfileRequestHandler::$profileFields[] = 'Twitter';
46

57
ProfileRequestHandler::$onBeforeProfileValidated = function($User, $profileChanges, $requestData) {

0 commit comments

Comments
 (0)