def update_session_auth_hash(request, user):
 request.session.cycle_key()
 if (hasattr(user, 'get_session_auth_hash') and (request.user == user)):
  request.session[HASH_SESSION_KEY] = user.get_session_auth_hash()

def update_session_auth_hash ( request , user ) : request . session . cycle_key ( ) if ( hasattr ( user , 'get_session_auth_hash' ) and ( request . user == user ) ) : request . session [ HASH_SESSION_KEY ] = user . get_session_auth_hash ( )
updating a users password logs out all sessions for the user .