Skip to content

Commit a3c1bf2

Browse files
authored
Merge pull request #577 from ExpressionEngine/feature/7.x/logged_in_avatar_filename
Added global variables for logged in user's avatar
2 parents 82ca1d8 + ccced7d commit a3c1bf2

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

docs/templates/conditionals.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,12 @@ You'll notice in the "logout" link above that a special path is used: {path='LOG
325325

326326
There are a handful of variables that are always available to conditionals.
327327

328+
### `logged_in_avatar_filename`
329+
### `logged_in_avatar_height`
330+
### `logged_in_avatar_width`
331+
332+
{if logged_in_avatar_filename}<img src="/avatars/{logged_in_avatar_filename}" width="{logged_in_avatar_width}" height="{logged_in_avatar_height}" />{/if}
333+
328334
### `logged_in_email`
329335

330336
{if logged_in_email $= 'example.com'} One of us! One of us! {/if}

docs/templates/globals/single-variables.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,30 @@ The email address for the site, as specified in [Email Configuration](control-pa
259259

260260
[TOC=3]
261261

262+
### `{logged_in_avatar_filename}`
263+
264+
The filename of avatar image for the currently logged-in user.
265+
266+
### `{logged_in_avatar_height}`
267+
268+
Height of avatar image for the currently logged-in user.
269+
270+
### `{logged_in_avatar_width}`
271+
272+
Width of avatar image for the currently logged-in user.
273+
262274
### `{logged_in_email}`
263275

264276
The email address for the currently logged-in user.
265277

278+
### `{logged_in_ip_address}`
279+
280+
This variable will be substituted with the IP address of the currently logged in user.
281+
282+
### `{logged_in_member_id}`
283+
284+
The Member ID for the currently logged-in user.
285+
266286
### `{logged_in_primary_role_id}`
267287

268288
The Primary Role ID number for the currently logged-in user.
@@ -279,14 +299,6 @@ The short name of the Primary Role for the currently logged-in user.
279299

280300
The Primary Role description for the currently logged-in user.
281301

282-
### `{logged_in_ip_address}`
283-
284-
This variable will be substituted with the IP address of the currently logged in user.
285-
286-
### `{logged_in_member_id}`
287-
288-
The Member ID for the currently logged-in user.
289-
290302
### `{logged_in_private_messages}`
291303

292304
The number of unread private messages for the currently logged-in user.

0 commit comments

Comments
 (0)