| | 113 | |
| | 114 | <mt:IfBlog> |
| | 115 | <mt:IfRegistrationAllowed> |
| | 116 | /*** |
| | 117 | * If request contains a '#_login' or '#_logout' hash, use this to |
| | 118 | * also delete the blog-side user cookie, since we're coming back from |
| | 119 | * a login, logout or edit profile operation. |
| | 120 | */ |
| | 121 | var clearCookie = ( window.location.hash && window.location.hash.match( /^#_log(in|out)/ ) ) ? true : false; |
| | 122 | if (clearCookie) { |
| | 123 | // clear any logged in state |
| | 124 | mtClearUser(); |
| | 125 | if (RegExp.$1 == 'in') |
| | 126 | mtFetchUser(); |
| | 127 | } else { |
| | 128 | <mt:Ignore> |
| | 129 | /*** |
| | 130 | * Uncondition this call to fetch the current user state (if available) |
| | 131 | * from MT upon page load if no user cookie is already present. |
| | 132 | * This is okay if you have a private install, such as an Intranet; |
| | 133 | * not recommended for public web sites! |
| | 134 | */ |
| | 135 | </mt:Ignore> |
| | 136 | if ( is_preview && !user ) |
| | 137 | mtFetchUser(); |
| | 138 | } |
| | 139 | </mt:IfRegistrationAllowed> |
| | 140 | </mt:IfBlog> |
| 896 | | <mt:IfBlog> |
| 897 | | <mt:IfRegistrationAllowed> |
| 898 | | /*** |
| 899 | | * If request contains a '#_login' or '#_logout' hash, use this to |
| 900 | | * also delete the blog-side user cookie, since we're coming back from |
| 901 | | * a login, logout or edit profile operation. |
| 902 | | */ |
| 903 | | var clearCookie = ( window.location.hash && window.location.hash.match( /^#_log(in|out)/ ) ) ? true : false; |
| 904 | | if (clearCookie) { |
| 905 | | // clear any logged in state |
| 906 | | mtClearUser(); |
| 907 | | if (RegExp.$1 == 'in') |
| 908 | | mtFetchUser(); |
| 909 | | } else { |
| 910 | | <mt:Ignore> |
| 911 | | /*** |
| 912 | | * Uncondition this call to fetch the current user state (if available) |
| 913 | | * from MT upon page load if no user cookie is already present. |
| 914 | | * This is okay if you have a private install, such as an Intranet; |
| 915 | | * not recommended for public web sites! |
| 916 | | */ |
| 917 | | </mt:Ignore> |
| 918 | | if ( is_preview && !user ) |
| 919 | | mtFetchUser(); |
| 920 | | } |
| 921 | | </mt:IfRegistrationAllowed> |
| 922 | | </mt:IfBlog> |
| 923 | | |
| 924 | | |
| 925 | | /* Section *****************************************************************/ |
| | 941 | /* END Movable Type Javascript *****************************************************************/ |