1 <h1
>Editing
<?php
echo $user->username
; ?
>&rsquo
;s profile
</h1
>
3 <?php
echo Notifications
::read(); ?
>
5 <section
class="content">
7 <form method
="post" action
="<?php echo Url::current(); ?>" novalidate autocomplete
="off">
10 <label
for="real_name">Real name
:</label
>
11 <input id
="real_name" name
="real_name" value
="<?php echo Input::post('real_name', $user->real_name); ?>">
13 <em
>The user
&rsquo
;s
real name
. Used in author
bylines (visible to
public).</em
>
17 <label
for="bio">Biography
:</label
>
18 <textarea id
="bio" name
="bio"><?php
echo Input
::post('bio', $user->bio
); ?
></textarea
>
20 <em
>A short biography
for your user
. Accepts valid HTML
.</em
>
24 <label
for="status">Status
:</label
>
25 <select id
="status" name
="status">
26 <?php
foreach(array('inactive','active') as $status): ?
>
27 <?php
$selected = (Input
::post('status', $user->status
) == $status) ?
' selected' : ''; ?
>
28 <option value
="<?php echo $status; ?>"<?php
echo $selected; ?
>>
29 <?php
echo ucwords($status); ?
>
34 <em
>If inactive
, the user will not be able to log in
.</em
>
38 <label
for="role">Role
:</label
>
39 <select id
="role" name
="role">
40 <?php
foreach(array('administrator', 'editor', 'user') as $role): ?
>
41 <?php
$selected = (Input
::post('role', $user->role
) == $role) ?
' selected' : ''; ?
>
42 <option value
="<?php echo $role; ?>"<?php
echo $selected; ?
>>
43 <?php
echo ucwords($role); ?
>
48 <em
>The user
&rsquo
;s role
. See
<a href
="//google.com">here
</a
> for more info
.</em
>
54 <legend
>User details
</legend
>
55 <em
>Create the details
for your
new user to log in to Test CMS
.</em
>
58 <label
for="username">Username
:</label
>
59 <input id
="username" name
="username" value
="<?php echo Input::post('username', $user->username); ?>">
61 <em
>The desired username
. Can be changed later
.</em
>
65 <label
for="password">Password
:</label
>
66 <input id
="password" type
="password" name
="password">
68 <em
>Leave blank
for no change
.</em
>
72 <label
for="email">Email
:</label
>
73 <input id
="email" name
="email" value
="<?php echo Input::post('email', $user->email); ?>">
75 <em
>The user
&rsquo
;s email address
. Needed
if the user forgets their password
.</em
>
80 <button type
="submit">Update
</button
>
81 <?php
if(Users
::authed()->id
!== $user->id
): ?
>
82 <button name
="delete" type
="submit">Delete
</button
>
85 <a href
="<?php echo admin_url('users'); ?>">Return to users
</a
>