Answers.Body: <p>Not particularly.</p>
  
  <p>UserSessionService has <a href="http://buildwithcraft.com/classreference/services/UserSessionService#setNotice-detail" rel="nofollow">setNotice()</a> and <a href="http://buildwithcraft.com/classreference/services/UserSessionService#setError-detail" rel="nofollow">setErrors()</a>, which are just wrappers for Yii's <a href="http://www.yiiframework.com/doc/api/1.1/CWebUser#setFlash-detail" rel="nofollow">setFlash()</a> where we pass in an <code>'error'</code> or <code>'notice'</code> for the key.</p>
  
  <p>Yii will take than and prepend the <code>FLASH_KEY_PREFIX</code> const which we set to <code>Craft.UserSessionService.flash.</code>.</p>
  
  <p>So an error's key will end up being <code>Craft.UserSessionService.flash.error</code> and a notice will be <code>Craft.UserSessionService.flash.notice</code>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-17T21:37:32.457Z
Answers.Text: So with this I would be able to do something like this `craft.session.getFlash('notice', 'Your settings have been saved')`? Only with the limitation that only one notice can be stored at a time.
Answers.UserDisplayName: Hasco
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-17T21:50:03.357Z
Answers.Text: Sounds pretty solid to me.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-17T21:32:37.153Z
Answers.LastActivityDate: 2014-11-17T21:32:37.153Z
Answers.UserDisplayName: Brad Bell
Body: <p>Does Craft have any default keys for flash messages like logging in or updating a profile?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-17T21:30:04.720Z
Comments.Text: Do you mean for the backend, to display messages in Crafts native alert message format?
Comments.UserDisplayName: naboovalley
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-17T21:31:58.020Z
Comments.Text: For the frontend, so you can do something like `{% set message = craft.session.getFlash('login') %}` for example.
Comments.UserDisplayName: Hasco
Tags: <users><user-profile><session><login>
Title: Does Craft have any default keys for flash messages?
ThreadText: # Does Craft have any default keys for flash messages?
  
  (Asked by: username_0 on 2014-11-17)
  
  Does Craft have any default keys for flash messages like logging in or updating a profile?
  
  **Tags:** users, user-profile, session, login
  
  > **Comments:**
  > **username_1**: Do you mean for the backend, to display messages in Crafts native alert message format?  
  > **username_0**: For the frontend, so you can do something like `{% set message = craft.session.getFlash('login') %}` for example.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2014-11-17. Score: 2 | Accepted answer
  
  Not particularly.
  
  UserSessionService has [setNotice()](http://buildwithcraft.com/classreference/services/UserSessionService#setNotice-detail) and [setErrors()](http://buildwithcraft.com/classreference/services/UserSessionService#setError-detail), which are just wrappers for Yii's [setFlash()](http://www.yiiframework.com/doc/api/1.1/CWebUser#setFlash-detail) where we pass in an `'error'` or `'notice'` for the key.
  
  Yii will take than and prepend the `FLASH_KEY_PREFIX` const which we set to `Craft.UserSessionService.flash.`.
  
  So an error's key will end up being `Craft.UserSessionService.flash.error` and a notice will be `Craft.UserSessionService.flash.notice`.
  
  > **Comments:**
  > **username_0**: So with this I would be able to do something like this `craft.session.getFlash('notice', 'Your settings have been saved')`? Only with the limitation that only one notice can be stored at a time.  
  > **username_2**: Sounds pretty solid to me.  
  
  ---
  
  